简体   繁体   中英

Installing cordova using cmd , <npm install -g cordova> gives error

I have installed node-js and set path to the bin folder, using Windows 7 . using cmd , i am installing cordova, with following command.

npm install -g cordova

it gives the following error,

C:\Users\admin>npm install -g cordova
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"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4

npm ERR! shasum check failed for C:\Users\admin\AppData\Local\Temp\npm-27416-181
c77ac\registry.npmjs.org\cordova-app-hello-world\-\cordova-app-hello-world-3.9.0
.tgz
npm ERR! Expected: 5866d8fed5582686c68ec59a6d1097c4ec0fcc4b
npm ERR! Actual:   33c6d47bbc528da2c1b9b8e6ae592c2f5dba371f
npm ERR! From:     https://registry.npmjs.org/cordova-app-hello-world/-/cordova-
app-hello-world-3.9.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!     C:\Users\admin\npm-debug.log

How to get resolve the problem ?

You need to Run as Administrator . Right click CMD and choose Run as Administrator . For mac, using this command, sudo npm install -g cordova .

Try using npm I -g cordova --verbose. It will log all the things in console. Watch it for any specific error. Where its struck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM