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] npm link <pkg>, error links.map is not a function in v7 #1777

Closed
rafgraph opened this issue Sep 8, 2020 · 1 comment
Closed

[BUG] npm link <pkg>, error links.map is not a function in v7 #1777

rafgraph opened this issue Sep 8, 2020 · 1 comment
Assignees
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@rafgraph
Copy link

rafgraph commented Sep 8, 2020

Current Behavior:

Running npm link <pkg> fails with error links.map is not a function. Error log attached.

Note that running npm link in the package I want to link works fine and adds that package to global node_modules.

Also note that switching to npm v6 for only the link <pkg> command, i.e. npx npm@latest link <pkg>, but using v7 for everything else works and is my current work around.

2020-09-08T13_50_33_197Z-debug.log

Expected Behavior:

For npm to link to the package version in global node_modules.

Steps To Reproduce:

  1. In a <pkg> directory run npm link
  2. In project where you want to use the linked version run npm link <pkg>

Environment:

  • OS: MacOS 10.15.6
  • Node: 12.8.3
  • npm: 7.0.0-beta.9
@rafgraph rafgraph 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 Sep 8, 2020
@ruyadorno ruyadorno added beta-bug and removed Needs Triage needs review for next steps labels Sep 10, 2020
@ruyadorno ruyadorno self-assigned this Sep 10, 2020
@ruyadorno ruyadorno added this to the v7.0.0-rc.0 milestone Sep 10, 2020
ruyadorno added a commit to ruyadorno/cli that referenced this issue Sep 10, 2020
- Added ELINKGLOBAL error code for when using --global
- Added tests for lib/link.js
- Do not reify, only load globals when linking a pkg to a local prefix
- Fixes: npm#1777
ruyadorno added a commit to ruyadorno/cli that referenced this issue Sep 10, 2020
- Added ELINKGLOBAL error code for when using --global
- Added tests for lib/link.js
- Do not reify, only load globals when linking a pkg to a local prefix
- Fixes: npm#1777
ruyadorno added a commit that referenced this issue Sep 16, 2020
- Added ELINKGLOBAL error code for when using --global
- Added tests for lib/link.js
- Do not reify, only load globals when linking a pkg to a local prefix
- Fixes: #1777
@ruyadorno
Copy link
Contributor

fixed in v7.0.0-beta.11 😄 thanks for the feedback! let us know if you get a chance to test it with the latest version!

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

2 participants