npm Community Forum (Archive)

The npm community forum has been discontinued.

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

Crash: invalid config key requested: error

What I Wanted to Do

npm install

What Happened Instead

cmd /C npm install
Unhandled rejection Error: invalid config key requested: error
    at pudGet (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\figgy-pudding\index.js:31:11)
    at FiggyPudding.get (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\figgy-pudding\index.js:13:12)
    at Object.get (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\figgy-pudding\index.js:71:16)
    at Object.checkData (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\ssri\index.js:232:22)
    at write (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\cacache\lib\content\write.js:34:31)
    at putData (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\cacache\put.js:29:10)
    at Object.x.put (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\cacache\locales\en.js:28:37)
    at readFileAsync.then.data (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\file.js:38:28)
    at tryCatcher (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
    at Promise._fulfill (C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:638:18)
    at C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\nodeback.js:42:21
    at C:\Users\matth\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\matth\AppData\Roaming\npm-cache\_logs\2018-08-29T17_31_06_572Z-debug.log

Reproduction Steps

git clone git@github.com:isaacabraham/vsts-fsharp.git
cd vsts-fsharp
git checkout 831da2dbee605f08e0285b4293dcacf2e31d2ef3
// delete npm cache - C:\Users\<user>\AppData\Roaming\npm-cache

cd Common
npm pack
cd ..
mkdir _build
mv Common/vsts-fsharp-task-common-0.1.0.tgz _build/

cd SetPaketCredentialProvider.dev
npm install // crashes

Workaround

delete package-lock.json

Details

From first investigation I’d assume it has to do something with the fact that the .tgz file has a different hash-sum than the one on the lock file. But npm should print a better error message or update the hash if that is the case. On the other hand everything works after initially deleting the lock-files.

Platform Info

$ npm --versions
{ npm: '6.4.0',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.32.0',
  node: '10.8.0',
  openssl: '1.1.0h',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.22.0',
  v8: '6.7.288.49-node.19',
  zlib: '1.2.11' }
$ node -p process.platform
win32


This is fixed by ssri@6.0.1 and will be part of the next npm release (post-6.4.1).


Can I already test or update? Or do you know when it will be released?


I’ve pushed the code up to the canary. You should be able to do npx npmc install now. The next npm release is scheduled for next week, but there’s a chance it won’t happen, since I’ll be on vacation until October 1.


I can verify that npx npmc install works. Thanks a lot for the fast response time!