cordova安装报错

发布于 2022-09-02 09:09:32 字数 2506 浏览 26 评论 0

我配置了镜像.npmrc
http://registry.cnpmjs.org

但是安装还是出现了

npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova"
npm ERR! node v4.2.4
npm ERR! npm  v2.14.12

npm ERR! shasum check failed for /tmp/npm-6072-79ec5d7c/registry.cnpmjs.org/underscore/download/underscore-1.7.0.tgz
npm ERR! Expected: 6bbaf0877500d36be34ecaa584e0db9fef035209
npm ERR! Actual:   90a941b7b28fba6827b7810b8098b4abf54c196a
npm ERR! From:     http://registry.cnpmjs.org/underscore/download/underscore-1.7.0.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

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

下的node.js是4.24版本

发现有个debug

debug里面

299 verbose cwd /Users/patrick
300 error Darwin 15.2.0
301 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova"
302 error node v4.2.4
303 error npm  v2.14.12
304 error shasum check failed for /tmp/npm-6072-79ec5d7c/registry.cnpmjs.org/underscore/download/underscore-1.7.0.tgz
304 error Expected: 6bbaf0877500d36be34ecaa584e0db9fef035209
304 error Actual:   90a941b7b28fba6827b7810b8098b4abf54c196a
304 error From:     http://registry.cnpmjs.org/underscore/download/underscore-1.7.0.tgz
305 error If you need help, you may report this error at:
305 error     <https://github.com/npm/npm/issues>
306 verbose exit [ 1, true ]
307 verbose unbuild lib/node_modules/cordova
308 info preuninstall cordova@5.4.1
309 info uninstall cordova@5.4.1
310 verbose unbuild rmStuff cordova@5.4.1 from /usr/local/lib/node_modules
311 silly gentlyRm /usr/local/bin/cordova is being gently removed
312 silly gentlyRm verifying /usr/local is an npm working directory
313 silly gentlyRm containing path /usr/local is under npm's control, in /usr/local
314 silly gentlyRm deletion target /usr/local/bin/cordova is under /usr/local
315 verbose gentlyRm vacuuming from /usr/local/bin/cordova up to /usr/local
316 info postuninstall cordova@5.4.1
317 silly gentlyRm /usr/local/lib/node_modules/cordova is being purged from base /usr/local
318 verbose gentlyRm don't care about contents; nuking /usr/local/lib/node_modules/cordova
319 silly vacuum-fs purging /usr/local/lib/node_modules/cordova
320 silly vacuum-fs quitting because other entries in /usr/local/lib/node_modules

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

巨坚强 2022-09-09 09:09:32

npm cache clean

npm install Cordova -g

硬不硬你别怂 2022-09-09 09:09:32

貌似node.js版本太高,你装一个3.XX的试试

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文