Closed alasdairhurst closed 7 years ago
We don't actually run npm link
. Instead we create a symlink in your code
folder called node_modules
that points up one directory to the code
folder. This simple solution means that the Node.js module resolution algorithm will find your code. Node.js just searches all node_modules/
folders up to the root of the system until it finds a folder inside that matches the module name being required.
So, in short, there's not a way we can run npm link
first. To use zelda
, don't depend on non-existent versions of modules. Or temporarily change the version before running zelda
.
In my use case I'm actively developing module
x
which is a dependency ofA
. The current branch of A depends on a version ofx
which is not published. When igit clone A
, thencd A
and runzelda
, it just tries tonpm install
, which fails since the registry cannot find the version ofx
that it depends on which is cloned and currently in development,Shouldn't this run npm link on any found dependencies BEFORE npm install takes place?