npm Community Forum (Archive)

The npm community forum has been discontinued.

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

"npm list errors on 5.6.0 with optional dependencies not installed "

What I Wanted to Do

Run npm list without any errors

What Happened Instead

It appears that transitive dependencies from optional dependencies result in “missing” errors when running npm list.

Reproduction Steps

Given a package.json:

{
  "dependencies": {
    "chokidar": "1.7.0"
  }
}

Run:

npm install
npm list

Details

There is a past github issue that dives in much better than I can explain/understand - https://github.com/npm/npm/issues/19393

Platform Info

$ npm --versions
5.10.0
$ node -p process.platform
linux
$ node --version
v6.14.4


Seems to be another case of this one:

Solution, waiting to be merged:

https://github.com/npm/cli/pull/76