Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] npm link confused by symlinks (windows) #2828

Open
WORMSS opened this issue Mar 5, 2021 · 3 comments
Open

[BUG] npm link confused by symlinks (windows) #2828

WORMSS opened this issue Mar 5, 2021 · 3 comments
Labels
Bug thing that needs fixing platform:windows is Windows-specific Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release

Comments

@WORMSS
Copy link

WORMSS commented Mar 5, 2021

Current Behavior:

I am creating a npm link to a package I am creating, and npm link creates a link to the wrong location.

Expected Behavior:

Create a link to the correct folder.

Steps To Reproduce:

Environment:

  • symlink directory: c:\code to c:\Users\WORMSS\code < because I am lazy and don't want to type the full path all the time
    • See (1) in image
  • config prefix c:\\program files\\nodejs
    • See (2) in image
  • package location: c:\Users\WORMSS\code\@wormss\genstack
    • See (3) in image
  • symlink directory c:\program files\node to c:\Users\WORMSS\AppData\Roaming\nvm\v15.9.0 < because that is where nvm installs the versions but NVM isn't required to setup the symlink
    • See (4) in image

image

Steps:

  • navigate to c:\code\@wormss\genstack (note, the shortcut of c:\code, not the full path through users)
    • See (3) in image
  • npm link < this makes genstack in global
    • See (5) in image
    • You will see it has made a link to c:\users\WORMSS\AppData\Roaming\code\@wormss\genstack instead of c:\code\@wormss\genstack

Environment:

OS: Windows 10
Node: 15.9.0
npm: 7.5.3

My thoughts (though I know nothing about what it is trying to do internally)

  • Possibly a root problem? Mistaking c:\code with \code o
  • Possibly a relative path problem? Mistakenly trying to do ..\..\ to get from c:\program files\nodejs to c:\ but mistakenly it taken it to c:\users\WORMSS\AppData\Roaming instead?
  • The only other coincidence I see, is that I do have a 'code' folder in c:\Users\WORMSS\AppData\Roaming\Code
    • But this has nothing at all to do with my code or nvm or npm or node.
    • I think this is to do with VSCode, but maybe npm is testing ..\..\code thinking it's testing c:\code but is actually hitting c:\Users\WORMSS\AppData\Roaming\Code and passing a test?? Maybe? no idea..
@WORMSS WORMSS 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 5, 2021
@darcyclarke darcyclarke added platform:windows is Windows-specific and removed Needs Triage needs review for next steps labels May 7, 2021
@darcyclarke
Copy link
Contributor

Looks like a legitimate bug; We'll dig in on this (seems like it could be caused by linking to a symlink)

@darcyclarke darcyclarke added the Priority 2 secondary priority issue label May 7, 2021
@WORMSS
Copy link
Author

WORMSS commented Jul 20, 2022

Just because this has been stale for a little while..
Has there been able update or traction with this bug?

@WORMSS
Copy link
Author

WORMSS commented Jun 26, 2023

Hello, Coming up to 2 years on this "Priority 2 bug" ?
Just wondering if there is anything I should be doing to help speed this along?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug thing that needs fixing platform:windows is Windows-specific Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants