You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
I'd like to have an option for npm link to create symbolic links instead of junctions (on Windows). Currently, the junction type is hardcoded.
The reason is simply that JetBrains decided to not support junctions - deleting a junction will delete the contents of its target in WebStorm. Of course, this is a bug on their side, but I think having an option would not harm npm.
I'm willing to create a pull request but I do not know yet how to pass the option the best way. Any suggestions? How do you think about this in general?
The text was updated successfully, but these errors were encountered:
I see and understand your problem, but there are a few other problems to overcome here. The reason that npm uses junctions is that creating symbolic links on Windows requires Administrator privileges. Every install using this option would therefore require that npm be run from a shell with Administrator privileges. The code is relatively simple to change, but we'd have to add new documentation with clear warnings that the option would only work when running as Administrator. The fact that people frequently miss things in the (voluminous) documentation in turn adds to npm's support overhead.
Adding an option is not in itself harmful, except for the fact that npm already has a vast number of options that make mastering its use harder than it could be. As a result, I'm reluctant to add new options unless there's a compelling use case.
Also, this particular scenario is working around a limitation in another tool. Taken all together, I don't think this is something it makes sense for npm to change. Thanks for asking, and for providing a clear use case!
I completely understand your reasoning. Thanks for the consideration. We now manually create symlinks instead of using npm link, which has the additional advantage that there are no global links (they do not suit our use case well)
I'd like to have an option for
npm link
to create symbolic links instead of junctions (on Windows). Currently, thejunction
type is hardcoded.The reason is simply that JetBrains decided to not support junctions - deleting a junction will delete the contents of its target in WebStorm. Of course, this is a bug on their side, but I think having an option would not harm npm.
I'm willing to create a pull request but I do not know yet how to pass the option the best way. Any suggestions? How do you think about this in general?
The text was updated successfully, but these errors were encountered: