我正在尝试安装grunt-cli。这是我正在执行的命令:
npm install -g grunt-cli
但是我收到以下错误消息。我的机器在公司代理下运行。是因为那??有人可以告诉我如何解决这个问题。
npm http GET http://registry.npmjs.org/grunt-cli
npm http 304 http://registry.npmjs.org/grunt-cli
npm http GET http://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.13.tgz
npm http 200 http://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.13.tgz
npm ERR! Error: shasum check failed for C:\Users\781650\AppData\Local\Temp\npm-6
640-cHN2e4JV\1401080165006-0.9552419183310121\tmp.tgz
npm ERR! Expected: e9ebc4047631f5012d922770c39378133cad10f4
npm ERR! Actual: 11b711d30f410c53585e0dee9d932cb24d49bab9
npm ERR! From: http://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.13.tgz
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\sha\index.
js:38:8
npm ERR! at ReadStream.<anonymous> (C:\Program Files\nodejs\node_modules\npm
\node_modules\sha\index.js:85:7)
npm ERR! at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
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/npm/npm/issues>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR!
答案 0 :(得分:0)
我猜最有可能是由于代理,尝试设置代理
npm config set proxy xxx
npm config set https-proxy xxx