npm Community Forum (Archive)

The npm community forum has been discontinued.

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

`npm install` or `npm update` turns a bunch of `resolved` in package-lock.json from real values to `false`

What I Wanted to Do

npm install

What Happened Instead

Running npm install or npm update sometimes trashes the lockfile, setting resolved: false for a number of packages:

         "array-unique": {
           "version": "0.3.2",
-          "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+          "resolved": false,
           "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
           "dev": true
         },
         "arrify": {
           "version": "1.0.1",
-          "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+          "resolved": false,
           "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
           "dev": true
         },
         "assign-symbols": {
           "version": "1.0.0",
-          "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+          "resolved": false,
           "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
           "dev": true
         },
...

rm -rf node_modules && npm install seems to (at least temporarily) resolve this issue.

Reproduction Steps

I don’t know exactly what causes this. Given that deleting and recreating node_modules fixes it, possibly it has something to do with npm link or with switching branches and having a dependency be missing from node_modules? That’s purely speculation, though/

Platform Info

$ npm --versions
{ loop: '2.13.4',
  npm: '6.4.1',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.32.0',
  node: '8.12.0',
  openssl: '1.0.2p',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.2',
  v8: '6.2.414.66',
  zlib: '1.2.11' }

$ node -p process.platform
darwin


Please don’t ignore the bug template. Can you edit this bug to include all the data in that template? I’ve seen this bug and can’t track it down so more detail would be helpful af.


Sorry; not sure how I managed to blow away the template. :stuck_out_tongue: Edited.