我正在尝试安装我的npm软件包,但是出现以下错误。我该怎么做才能解决此问题?
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 BB.each (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 (timers.js:637:19)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user81\AppData\Roaming\npm-cache\_logs\2019-08-27T06_37_01_928Z-debug.log
版本:
@angular/cli: 1.3.1
node -v v11.9.0
npm -v 6.5.0
答案 0 :(得分:0)
尝试一下
node_modules
文件夹。package.lock.json
文件。我删除了该文件。npm install
。答案 1 :(得分:0)
遵循以下步骤
1.删除node_modules文件夹
2.打开CLI并运行npm cache clean --force
3.再次安装npm模块
4.运行
如果问题仍然存在,请从系统中删除Node。删除节点之前,请运行npm cache clean --force
。然后重新启动系统并安装兼容的节点版本。如果您使用Angular 1(Angular JS),则最新的节点程序包版本将不支持