问题
This is an error with npm itself. Please report this error at: https://npm.community
npm ERR! code EINVALIDTYPE npm ERR! typeerror Error: Argument #5: Expected object but got string npm ERR! typeerror at inflatableChild (C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:93:3) npm ERR! typeerror at C:\Program Files\nodejs\node_modules\npm\lib\install\inflate-shrinkwrap.js:55:12 npm ERR! typeerror at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23) npm ERR! typeerror at Object.gotValue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\reduce.js:155:18) npm ERR! typeerror at Object.gotAccum (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\reduce.js:144:25) npm ERR! typeerror at Object.tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23) npm ERR! typeerror at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31) npm ERR! typeerror at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18) npm ERR! typeerror at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10) npm ERR! typeerror at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:694:18) npm ERR! typeerror at _drainQueueStep (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:138:12) npm ERR! typeerror at _drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:131:9) npm ERR! typeerror at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:147:5) npm ERR! typeerror at Immediate.Async.drainQueues [as _onImmediate] (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14) npm ERR! typeerror at processImmediate (internal/timers.js:439:21) npm ERR! typeerror This is an error with npm itself. Please report this error at: npm ERR! typeerror https://npm.community
node 12.6.0 npm 6.9.0
回答1:
Try to use LTS version not current version. Right now LTS of node is 10.16.0
and the current version is 12.6.0
.
LTS tend to be more stable and have less bug because is stable version
Then when you installed is done try to run
npm cache clean --force
Then remove package-lock.json
Delete node_modules
folder
Then run npm i
回答2:
Try this:
1- remove node_modules folder 2- npm cache clean --force 3- npm install
来源:https://stackoverflow.com/questions/56928461/npm-packages-not-installing-getting-this-error