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
I am not 100% sure if this is a bug or I'm just misunderstanding the proper behaviour, but I don't really see a clear way to resolve it. I'm also having trouble building a minimal reproducing case because I don't seem to be able to play the npm link trick without first publishing the package I'm trying to cross-link.
I want to do local development on everything together, so I do:
( cd project-a/subproject-a && npm link )
cd project-b
npm link subproject-a
npm install
If I do something in project-b that requires webpack-merge, it generally won't be able to find the dependency, because it isn't anywhere in the upstream of subproject-a as it appears in project-b/node_modules.
I also observed the issue (already logged) that npm link updates project-b/package.lock with a file: reference.
EDIT: Also note that if I break ranks and run npm install in subproject-a directly, everything works according to plan.
#2034 I don't think is a duplicate. It talks about modifying package.json, whereas this is about the general dependency locating mechanism.
I also encountered another issue with locating of dependencies; hoisted dependencies can't be found by npm exec when the lower-layer package.json has its own node_modules. The search stops as soon as it sees any .bin directory.
I am not 100% sure if this is a bug or I'm just misunderstanding the proper behaviour, but I don't really see a clear way to resolve it. I'm also having trouble building a minimal reproducing case because I don't seem to be able to play the
npm link
trick without first publishing the package I'm trying to cross-link.Explanation:
Imagine a repo like this:
I want to do local development on everything together, so I do:
If I do something in
project-b
that requireswebpack-merge
, it generally won't be able to find the dependency, because it isn't anywhere in the upstream ofsubproject-a
as it appears inproject-b/node_modules
.I also observed the issue (already logged) that
npm link
updatesproject-b/package.lock
with afile:
reference.EDIT: Also note that if I break ranks and run
npm install
insubproject-a
directly, everything works according to plan.Versions:
[email protected]
The text was updated successfully, but these errors were encountered: