npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm list (version > 6.7.0) fails to list dependencies from linked modules

What I Wanted to Do

Before running tests, I run npm list 1>/dev/null && ... in order to ensure that I’m testing with what I think I have.

What Happened Instead

npm list failed with non-zero exit code claiming all dependencies of my linked modules were UNMET.

Reproduction Steps

Link a module with dependencies to another module, run npm list, non-zero exit code.

  1. link some module /moduleA $ npm link
  2. link it to another /moduleB $ npm link moduleA
  3. list /moduleB $ npm list <- non-zero exit code, moduleA dependencies are UNMET


This is a behavior change for npm versions > 6.7.0

Platform Info

$ npm --versions
{ npm: '6.9.0',
  node: '8.10.0' }
$ node -p process.platform

This is still a thing… took a while to figure out what was breaking after I updated npm by accident.