-
Notifications
You must be signed in to change notification settings - Fork 3k
link: can't relatively link another module multiple times #7579
Comments
Thanks for the bug report. This is a relatively new bug that was probably introduced when @othiym23 fixed a horrific problem where |
This is a real and super annoying bug that bit me several times this weekend alone. It will get fixed soon. Thanks for filling the issue, @jonathanong! |
Fixes #7579. When npm removes a file or directory, it verifies whether the thing being removed is under npm's control. This isn't something that can be ascertained directly, so gentlyRm checks to see if there's a plausible case that this file was something that was originally installed by npm. Mostly it just verifies whether either the deletion target or the parent directory (which could be passed in as the base, or could be the prefix otherwise) is under one of the paths that npm might have reason to mess with. It will also deal with a certain amount of symbolic link trickery, but this being done overly aggressively before, and now has been cleaned up some.
The bug had been around for a while. I think it was more that most people weren't encountering it because the situations in which it bit were fairly specific. I gave |
ex. if i link to the same module multiple times with
npm link ../standardberry
, i'll get the following error:thing is... it's the same file. i really should be doing
npm link standardberry
at this point, but sometimes i don't remember if i've linked a module or not.solution would be to check whether the binaries point to the same location before actually erroring.
The text was updated successfully, but these errors were encountered: