-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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] Critical issue with npm link --install-links --save ../package/
deleting the package directory!
#4863
Comments
Same here. My
|
Same here, with |
Four months passed since the issue created. Anyone knowns when can we get a fix for this or is there a temporary workround? |
I came across this issue this afternoon. Kind of freaked out, to be honest. You guys came across any workarounds for linking local npm packages when using npm v8?? |
hey @glen-84 , Not sure if it would help you, but I am using NPM link without --install-links. What I do is to run NPM install on the package(sub-package) I want to link to the main project before linking it and it is working for me, The dependencies work well, this way it may not brake your other packages. It did not work for me using NPM install (it makes sense). In this case the --install-links saved me but I am still going back and forward with testing using different scenarios to see which one would be my best option. That being said, Depending on how tomorrow goes I will edit this comment. Hope it helps. |
@glen-84 I tried reproducing this bug with the steps mentioned, In attached screenshot you can see we are installing packageA from packageB with same command but nothing gets deleted. Can you share some sample repository which can be cloned to reproduce this bug? |
This has been tried on latest as well as given version, but its not reproducing. |
The npm version in your screenshot is neither the version that I specified, nor the latest version. I was also running on Linux, using a scoped package, etc. With that said, I don't have a sample repository, and I'm not really working with node/npm lately, so this issue is not a high priority for me. Perhaps one of the other affected users can provide a reproduction, otherwise feel free to close the issue. |
I am able to reproduce in original mentioned version(8.9.0) but not in the latest.. closing. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I have two local packages that I need to link, and since regular linking is so broken, I decided to use the new
install-links
option. Linking one package removes the other, so I added--save
.This is the output from the first link command (
npm link --install-links --save ../api-client-js/
):This DELETED the contents of the
api-client-js
directory! I thought I was going crazy. Then it happened again.I am very lucky that I have a backup of the local changes to this package.
Expected Behavior
Not to delete my package. 😐
... and to install the link, and save it.
Steps To Reproduce
npm link --install-links --save ../some-package/
from another package.some-package
disappear.Environment
The text was updated successfully, but these errors were encountered: