Skip to content
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] Impossible to link more than one local module dependency one at a time. #2819

Closed
tristanls opened this issue Mar 4, 2021 · 5 comments
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@tristanls
Copy link

#2554 was closed without an explanation and without fixing the bug.

@tristanls tristanls added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Mar 4, 2021
@joebnb
Copy link

joebnb commented Mar 19, 2021

same problem

if link a scoped module @scope/name1 at dir1 it will remove all dir1/node_modules/@scope/*

i just want add a link moudle, not rm -rf @scope/ dir then link this one

@CodeTroopers
Copy link

Same problem with npm 7.6.3

  • from depency @mycompany/B:

cd dist && npm link

  • from depency @mycompany/C:

cd dist && npm link

  • from main project @mycompany/A:
    npm link @mycompany/B
    Symlink @mycompany/B exists in node_modules
    npm link @mycompany/C
    Symlink @mycompany/C exists in node_modules
    but Symlink @mycompany/B is deleted in node_modules

This works well with npm 6.14.11

@darcyclarke
Copy link
Contributor

The way you can work around this today is to link these deps at the same time (ex. npm link @mycompany/B @mycompany/C); There are improvements that could be made to npm link but those would probably be feature requests/improvements; Definitely feel free to open up an RFC over on npm/rfcs if you have ideas on how this should work differently in the future.

@darcyclarke darcyclarke removed the Needs Triage needs review for next steps label May 7, 2021
@tristanls
Copy link
Author

Since this is the second time you're closing this issue as is without changing anything, the only remaining suggestion I have is that perhaps this should be documented per #2554 (comment)

@CodeTroopers
Copy link

@darcyclarke you say "those would probably be feature requests/improvements"
But this worked with NPM 6.14.11. so it's rather a regression of npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

4 participants