我正在使用win-7 64位。我已经下载了&安装了NodeJs 1.3.14
然后我尝试使用guide
安装cordova
并运行命令npm install -g cordova
,最终出现错误,下面是日志的最后一行:
8106 silly gunzTarPerm modified mode [ 'node_modules/which/bin/which', 438, 420 ]
8107 silly lockFile b0283f67-ing-npm-cache-npm-1-3-14-package tar://C:\Users\hp\AppData\Roaming\npm-cache\npm\1.3.14\package
8108 silly lockFile b0283f67-ing-npm-cache-npm-1-3-14-package tar://C:\Users\hp\AppData\Roaming\npm-cache\npm\1.3.14\package
8109 silly lockFile 20b15fea-npm-cache-npm-1-3-14-package-tgz tar://C:\Users\hp\AppData\Roaming\npm-cache\npm\1.3.14\package.tgz
8110 silly lockFile 20b15fea-npm-cache-npm-1-3-14-package-tgz tar://C:\Users\hp\AppData\Roaming\npm-cache\npm\1.3.14\package.tgz
8111 verbose chmod C:\Users\hp\AppData\Roaming\npm-cache\npm\1.3.14\package.tgz 644
8112 silly chown skipping for windows C:\Users\hp\AppData\Roaming\npm-cache\npm\1.3.14\package.tgz
8113 silly lockFile 150d9711-try-npmjs-org-npm-npm-1-3-14-tgz https://registry.npmjs.org/npm/-/npm-1.3.14.tgz
8114 silly lockFile 150d9711-try-npmjs-org-npm-npm-1-3-14-tgz https://registry.npmjs.org/npm/-/npm-1.3.14.tgz
8115 silly lockFile c1177926-npm-1-3-14 npm@1.3.14
8116 silly lockFile c1177926-npm-1-3-14 npm@1.3.14
8117 silly lockFile 8b2e1d24-npm-1-3-x npm@1.3.x
8118 silly lockFile 8b2e1d24-npm-1-3-x npm@1.3.x
8119 silly lockFile c8e2010f-lator-ripple-emulator-0-9-18-tgz https://registry.npmjs.org/ripple-emulator/-/ripple-emulator-0.9.18.tgz
8120 silly lockFile c8e2010f-lator-ripple-emulator-0-9-18-tgz https://registry.npmjs.org/ripple-emulator/-/ripple-emulator-0.9.18.tgz
8121 silly lockFile e7de7f23-ripple-emulator-0-9-18 ripple-emulator@0.9.18
8122 silly lockFile e7de7f23-ripple-emulator-0-9-18 ripple-emulator@0.9.18
8123 verbose about to build C:\Users\hp\AppData\Roaming\npm\node_modules\cordova
8124 info C:\Users\hp\AppData\Roaming\npm\node_modules\cordova unbuild
8125 info preuninstall cordova@3.1.0-0.2.0
8126 info uninstall cordova@3.1.0-0.2.0
8127 verbose true,C:\Users\hp\AppData\Roaming\npm\node_modules,C:\Users\hp\AppData\Roaming\npm\node_modules unbuild cordova@3.1.0-0.2.0
8128 verbose C:\Users\hp\AppData\Roaming\npm,[object Object] binRoot
8129 info postuninstall cordova@3.1.0-0.2.0
8130 error Error: shasum check failed for C:\Users\hp\AppData\Local\Temp\npm-13152-JkoqFrUn\1384785262909-0.39034782187081873\tmp.tgz
8130 error Expected: 022df983c7dd613aee3c761126d92608b9d59efd
8130 error Actual: 42439770db057c2fffc6f2c563aea9674c083430
8130 error at C:\nodejs\node_modules\npm\node_modules\sha\index.js:38:8
8130 error at ReadStream.<anonymous> (C:\nodejs\node_modules\npm\node_modules\sha\index.js:85:7)
8130 error at ReadStream.EventEmitter.emit (events.js:117:20)
8130 error at _stream_readable.js:920:16
8130 error at process._tickCallback (node.js:415:13)
8131 error If you need help, you may report this log at:
8131 error <http://github.com/isaacs/npm/issues>
8131 error or email it to:
8131 error <npm-@googlegroups.com>
8132 error System Windows_NT 6.1.7600
8133 error command "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
8134 error cwd C:\Users\hp
8135 error node -v v0.10.22
8136 error npm -v 1.3.14
8137 verbose exit [ 1, true ]
我是NodeJS&amp;的新手。科尔多瓦,如果我能在其他地方找到答案,也请告诉我。
答案 0 :(得分:0)
我遇到的那个sam问题,我在下面运行了comman,然后再次尝试安装模块为我工作。
npm set registry https://registry.npmjs.org/