-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] npm link updates package.json to point to local directory #2034
Comments
I confirm the same experience on Windows 10 1909 with NodeJS 15.0.1. |
This example should be a full reduced repro:
Also tried the above |
Workarounds:
|
Unfortunately symlinking it manually like that won't set up any binary symlinks, nor will it run the appropriate lifecycle scripts. |
Trying with I think this is clearly a change in behavior that minimally needs to be documented in the release notes. I'm relying on |
It would be great to have someone from NPM acknowledge this/give us some kind of a heads-up, I had to revert back to npm@6 because linking anything is a pain, especially when you have to do it often |
When running `npm link <pkg>` it should not save the new item to the currrent dependencies of that package.json file. Fixes: npm#2034
When running `npm link <pkg>` it should not save the new item to the currrent dependencies of that package.json file. Fixes: npm#2034 Co-authored-by: Darcy Clarke <[email protected]>
Sorry about the delay @Gameghostify and thanks @wesleytodd for the handy reproduction 😊 This was fixed in |
@ruyadorno thank you for your hard work! It works now, which means I can finally use npm@7 for everything |
Current Behavior:
npm link foo-bar
updates package.json to point to the local directory of the foo-bar module instead of just symlinking itNote that foo-bar is a private package installed from git (git+ssh)
Expected Behavior:
npm link foo-bar
creates a symlink innode_modules/
without altering package.jsonSteps To Reproduce:
The package foo-bar is now symlinked to the local
foo-bar
folder instead of the link innpm root -g
Environment:
The text was updated successfully, but these errors were encountered: