安装npm install -g cordova ionic时出错

时间:2016-10-10 07:13:43

标签: node.js cordova ionic-framework npm-install

我使用离子设计应用程序。当我使用node.js安装cordova时,我遇到了这些问题。

C:\Users\KSS>npm install -g cordova ionic
npm ERR! Windows_NT 6.1.7600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" "ionic"
npm ERR! node v4.6.0
npm ERR! npm  v2.15.9

npm ERR! shasum check failed for C:\Users\KSS\AppData\Local\Temp\npm-5012-d
4aedd8a\registry.npmjs.org\ionic\-\ionic-2.1.0.tgz
npm ERR! Expected: cc4218ec13f31b635c1119c9defae5b2bad31335
npm ERR! Actual:   88177629627a16987bec942611d1ca9e69b8aba9
npm ERR! From:     https://registry.npmjs.org/ionic/-/ionic-2.1.0.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

1 个答案:

答案 0 :(得分:1)

校验和失败npm ERR! shasum check failed

您可以尝试升级到最新版本的npm:

npm install -g npm 

升级到npm 3。

另外:

npm cache clean

npm set registry https://registry.npmjs.org/ 

为某些https://github.com/npm/npm/issues/2701

工作