Allow symlinks for npm link instead of junctions #652
Unanswered
michael-ts
asked this question in
RRFC
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is an identical request to #8520 but for a different use case.
I have a large number of files inside a Linux VM running under Hyper-V that are accessible to Windows via a network share. Some of these are development files that I am trying to
npm link
to a project on the Windows side. Thenpm link
command works, but when I then try tonpm link <project>
I get errors about package.json not being found. When I rundir
on the path that holds the junction, sure enough, it appears to contain no files. The best that I can tell, this seems to be a limitation of Windows not being able to see junctions on shared drives.Actually, how npm even manages to create the junction is a mystery to me, because if I try to manually create a junction to a shared drive, even as Administrator, it fails with the message:
(As a side note, technically, the volume is local, just not in the sense Windows wants it to be. It's a physical drive in the same machine, it's just that it's behind a Linux VM.)
I thought I could work around the issue by deleting the junction and then creating a symlink manually. But when I go to
npm link <project>
it creates another junction which also doesn't work. So now I have to delete that as well and create another symlink. At this point I don't know why I am even bothering with usingnpm
to do somethingnpm
should do, other than perhaps the fact that I can add--save
and at least I won't have to go through all of this again any time I install anything else.I understand the previous request was closed due to symlinks requiring administrator privileges and this is a bit of a pain, but unlike the previous use case I'm not sure what the proper way to work around this is other than to simply not use npm, which seems... wrong somehow.
Beta Was this translation helpful? Give feedback.
All reactions