You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the description of pnpm link, its functionality is very straightforward—it simply links the target package to the node_modules directory.
However, pnpm performs more complex checks. For example, if a package's package.json includes workspace dependencies, pnpm will sequentially check whether the current workspace contains that package. If it doesn't, pnpm will throw an error.
It seems that this issue has been resolved in pnpm@10. But it will automatically make some configuration changes for me.
But we don't need these, right? Because the target path is uncertain, if we accidentally commit the changes, it will cause problems. At the same time, it creates symbolic links in the root node_modules directory, which means that the rush-pnpm link command will no longer work in pnpm@10.
We need two additional Rush commands to address this issue.
The first one works similarly to pnpm link, but it prevents issues arising from version differences in pnpm. However, it still cannot address problems with peerDependencies.
The second approach is similar to installing a package normally, but with symbolic links, changes are automatically synchronized. The current dependency relationships are as follows:
The dependencies of this package should also be synchronized. For example, when both the dependent package and the dependency package rely on React, it can be correctly resolved. The current dependency relationships are as follows:
I think both of these commands are essential. The first one is simple and intuitive, while the second may require additional configuration.
The text was updated successfully, but these errors were encountered:
Summary
From the description of
pnpm link
, its functionality is very straightforward—it simply links the target package to thenode_modules
directory.However, pnpm performs more complex checks. For example, if a package's
package.json
includes workspace dependencies, pnpm will sequentially check whether the current workspace contains that package. If it doesn't, pnpm will throw an error.It seems that this issue has been resolved in
pnpm@10
. But it will automatically make some configuration changes for me.But we don't need these, right? Because the target path is uncertain, if we accidentally commit the changes, it will cause problems. At the same time, it creates symbolic links in the root
node_modules
directory, which means that therush-pnpm
link command will no longer work inpnpm@10
.We need two additional Rush commands to address this issue.
Details
rush link-package
rush bridge-package
The first one works similarly to
pnpm link
, but it prevents issues arising from version differences in pnpm. However, it still cannot address problems withpeerDependencies
.The second approach is similar to installing a package normally, but with symbolic links, changes are automatically synchronized. The current dependency relationships are as follows:
The dependencies of this package should also be synchronized. For example, when both the dependent package and the dependency package rely on
React
, it can be correctly resolved. The current dependency relationships are as follows:I think both of these commands are essential. The first one is simple and intuitive, while the second may require additional configuration.
The text was updated successfully, but these errors were encountered: