npm Community Forum (Archive)

The npm community forum has been discontinued.

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

npm install installs extraneous deps

What I Wanted to Do

Install gulp in an empty directory.

What Happened Instead

It installed, but npm ls failed due to extraneous errors.

Reproduction Steps

  1. mkdir test
  2. cd test
  3. npm i gulp

Details

Versions:

{ npm: '6.1.0',
  ares: '1.14.0',
  cldr: '33.0',
  http_parser: '2.8.0',
  icu: '61.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.29.0',
  node: '10.1.0',
  openssl: '1.1.0h',
  tz: '2018c',
  unicode: '10.0',
  uv: '1.20.2',
  v8: '6.6.346.27-node.6',
  zlib: '1.2.11' }

Note: this only happens without a package.json.
No crash.
This is from https://github.com/npm/npm/issues/20931.


Extraneous means they’re not in your package.json, basically :slight_smile: