-
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] npm link removes previously linked module #4287
Comments
This repo is for arborist; this sounds more like something that belongs on https://github.com/npm/rfcs or https://github.com/npm/cli |
@ljharb Well, to be fair, if there's a bug in the workflows described, it almost certainly is a bug in Arborist, so this isn't an entirely inappropriate place to post it. @mshima We just published a new npm version with a fix that might be relevant here. Can you |
@isaacs I've tried the npm IMO the real fix is to don't touch manually linked leafs. First problem:It happens when a dependency of a linked module is deduped and moved down the tree. The consequence is that Second problem:A manually linked module should not be overridden, in this case a second The first problem happens in npm 6, while the second is a regression. |
I ran the steps to reproduce this in my dev environment (Arch Linux, npm v8.3.0, node v17.3.0) and the part 1 problem of npm breaking packages on I encountered the part 2 problem in my own package setup when Edit: Another thing that makes working with linked packages annoying is that |
If my tests are correct, this bug has the worst effect in the context of workspaces, because it prevents you from linking different external packages to different workspaces. I tried working around it using |
Related to npm/npm#17287 . Please...: npm/npm#17287 (comment) |
What / Why
Developing coupled packages linked with npm link is not optimal.
npm link
breaks the linked package.npm link
removes others links. (regression from npm 6)When
Developing/testing linked packages together
Where
How
Current Behavior
Steps to Reproduce
Preparing the environment
Reset the environment
npm link
breaks the linked package.output:
Workaround go to generator folder and execute
npm ci
npm link
removes others links. (regression from npm 6)output:
output:
Workaround: link both together
npm link yeoman-generator yeoman-environment
Expected Behavior
Who
References
The text was updated successfully, but these errors were encountered: