当前位置:  开发笔记 > 编程语言 > 正文

将npm从2.10.1升级到3.5.2后,为什么`npm update -g`&`npm outdated`无法正常工作?

如何解决《将npm从2.10.1升级到3.5.2后,为什么`npmupdate-g`&`npmoutdated`无法正常工作?》经验,为你挑选了1个好方法。

在将npm从2.10.1更新为3.5.2后,我现在收到两个类似的错误.

npm通过运行更新 npm update -g

我在OSX 10.10.5上运行节点v0.12.4,通过自制程序安装

两条错误消息

1这是我现在从运行中得到的错误npm outdated -g --depth=0:

npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "outdated" "-g" "--depth=0"
npm ERR! node v0.12.4
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at module.exports (/usr/local/lib/node_modules/npm/lib/install/mutate-into-logical-tree.js:12:3)
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/lib/outdated.js:78:5
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/lib/outdated.js:62:20
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:186:9
npm ERR! typeerror     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:152:20
npm ERR! typeerror     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm ERR! typeerror     at then (/usr/local/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:121:22)
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:81:20
npm ERR! typeerror     at fs.js:1518:23
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/brianzelip/npm-debug.log

2这是我现在从运行中获得的错误消息npm update -g:

npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "update" "-g"
npm ERR! node v0.12.4
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at module.exports (/usr/local/lib/node_modules/npm/lib/install/mutate-into-logical-tree.js:12:3)
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/lib/outdated.js:78:5
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/lib/outdated.js:62:20
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:186:9
npm ERR! typeerror     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:152:20
npm ERR! typeerror     at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm ERR! typeerror     at then (/usr/local/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:121:22)
npm ERR! typeerror     at /usr/local/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:81:20
npm ERR! typeerror     at fs.js:1518:23
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/brianzelip/npm-debug.log

小智.. 5

在我的情况下,这是由于有一个全局包符号链接,其目标已被删除.



1> 小智..:

在我的情况下,这是由于有一个全局包符号链接,其目标已被删除.

推荐阅读
小妖694_807
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有