When a package in a monorepo is depended on by other packages, and has the following publishConfig settings in package.json:
{
"publishConfig: {
"directory": "dist",
"linkDirectory: true
}
}
the symlink only gets created if the dist folder actually exists.
This setting breaks repos that follow a typical install => link => build model. Monorepos with lots of cross-repo dependencies cannot successfully build dists without upstream local dependencies also being built first.
pnpm version:
7.9.0
Code to reproduce the issue:
Repro repo here:
https://github.com/michaelwarren1106/pnpm-linking-repro
Steps to reproduce the issue are in the README.md
Expected behavior:
Symlinks are created for the specified publishConfig.directory path (including a package scope directory if necessary) regardless of whether or not the specified directory exists.
Actual behavior:
Symlinks are not created if the specified publishConfig.directory folder does not exist. Warnings are seen in the console instead.
Related issues
#5115
#3901
Related Discussion
#5204 (reply in thread)
When a package in a monorepo is depended on by other packages, and has the following
publishConfigsettings inpackage.json:the symlink only gets created if the
distfolder actually exists.This setting breaks repos that follow a typical install => link => build model. Monorepos with lots of cross-repo dependencies cannot successfully build dists without upstream local dependencies also being built first.
pnpm version:
7.9.0
Code to reproduce the issue:
Repro repo here:
https://github.com/michaelwarren1106/pnpm-linking-repro
Steps to reproduce the issue are in the README.md
Expected behavior:
Symlinks are created for the specified
publishConfig.directorypath (including a package scope directory if necessary) regardless of whether or not the specified directory exists.Actual behavior:
Symlinks are not created if the specified
publishConfig.directoryfolder does not exist. Warnings are seen in the console instead.Related issues
#5115
#3901
Related Discussion
#5204 (reply in thread)