Skip to content

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

@rafgraph

Description

@rafgraph

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

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions