npm Community Forum (Archive)

The npm community forum has been discontinued.

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

npm dedupe fails

What I Wanted to Do

npm dedupe

What Happened Instead

First, rollbackFailedOptional step took so long I thought it’s stuck. Then, the following error appeared:

C02VH1V5HV2Q:stingray w.maj$ npm dedupe
(node:33326) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
    at rmStuff (/usr/local/lib/node_modules/npm/lib/unbuild.js:61:24)
    at Array.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
    at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
    at /usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
(node:33326) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of anasync function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:33326) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm ERR! cb() never called!

Reproduction Steps

Just a plain npm dedupe, don’t know what has caused it. (417,8 KB)



Platform Info

macOS newest version

$ npm --versions
{ npm: '6.5.0',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '67',
  napi: '3',
  nghttp2: '1.34.0',
  node: '11.1.0',
  openssl: '1.1.0i',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '',
  zlib: '1.2.11' }
$ node -p process.platform