使用以下方法在我的Mac OS计算机上安装PhoneGap时遇到问题:
sudo npm install -g phonegap
错误讯息:
npm ERR! Error: shasum check failed for /Users/MYUSER/tmp/npm-33966-l4NZ7A8D/1387281663617-0.9133979633916169/tmp.tgz
npm ERR! Expected: dee5a33ff04d7217194dc1ad1342e3a441761942
npm ERR! Actual: ab7d89ca1f31db14db047d01222dd968649cfb50
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR! at ReadStream.EventEmitter.emit (events.js:120:20)
npm ERR! at _stream_readable.js:896:16
npm ERR! at process._tickCallback (node.js:599:11)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "phonegap"
npm ERR! cwd /Users/HummusawY
npm ERR! node -v v0.11.10-pre
npm ERR! npm -v 1.3.17
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/MYUSER/npm-debug.log
npm ERR! not ok code 0
答案 0 :(得分:4)
试试这个:
sudo npm install https://registry.npmjs.org/npm/-/npm-1.3.19.tgz
然后
sudo npm install -g phonegap
引起的
答案 1 :(得分:2)
&#34; npm set registry https://registry.npmjs.org/&#34;
&#34; npm set registry http://ec2-46-137-149-160.eu-west-1.compute.amazonaws.com&#34;
npm install express
答案 2 :(得分:0)
您可以将Node.js降级到版本0.10.19以解决问题
答案 3 :(得分:0)
尝试:npm install https://registry.npmjs.org/npm/-/npm-1.3.21.tgz
从“19”变为21