您好我无法从npm安装cordova有人可以帮助我,谢谢。
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'cordova' ]
2 info using npm@2.5.1
3 info using node@v0.12.0
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 silly cache add args [ 'cordova', null ]
6 verbose cache add spec cordova
7 silly cache add parsed spec { raw: 'cordova',
7 silly cache add scope: null,
7 silly cache add name: null,
7 silly cache add rawSpec: 'cordova',
7 silly cache add spec: 'C:\\Users\\SarahPrat\\cordova',
7 silly cache add type: 'local' }
8 silly addLocalTarball shasum (computed) da39a3ee5e6b4b0d3255bfef95601890afd80709
9 verbose addTmpTarball C:\Users\SarahPrat\cordova not in flight; adding
10 verbose addTmpTarball validating metadata from C:\Users\SarahPrat\cordova
11 verbose tar unpack C:\Users\SarahPrat\cordova
12 verbose tar unpacking to C:\Users\SARAHP~1\AppData\Local\Temp\npm-6544-89c7caba\unpack-5a50cbddcae0
13 verbose gentlyRm vacuuming C:\Users\SARAHP~1\AppData\Local\Temp\npm-6544-89c7caba\unpack-5a50cbddcae0
14 silly gunzTarPerm modes [ '777', '666' ]
15 error tar.unpack error reading C:\Users\SarahPrat\cordova
16 error addLocal Could not install C:\Users\SarahPrat\cordova
17 verbose stack Error: 0-byte tarball
17 verbose stack Please run `npm cache clean`
17 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\utils\tar.js:126:14
17 verbose stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:99:15)
18 verbose cwd C:\Users\SarahPrat
19 error Windows_NT 6.3.9600
20 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
21 error node v0.12.0
22 error npm v2.5.1
23 error 0-byte tarball
23 error Please run `npm cache clean`
24 error If you need help, you may report this error at:
24 error <http://github.com/npm/npm/issues>
25 verbose exit [ 1, true ]
答案 0 :(得分:0)
我的建议是不要打扰所有的命令行。您可以在Eclipse中安装Eclipse Thym(The hybride Mobile)插件,并通过左键单击project-&gt;添加您在Eclipse中所需的每个cordova插件。安装cordova插件。
它对我有用,希望有所帮助
您可以使用Help-&gt; Eclipse Marketplace-&gt;类型Eclipse thym
在Eclipse中安装Eclipse Thym但是,如果您不想这样做,要使用npm,您必须首先安装Node:https://nodejs.org/
最后,这是一个入门教程:
http://ccoenraets.github.io/cordova-tutorial/create-cordova-project.html
答案 1 :(得分:0)
根据您的错误消息,您的问题有两种解决方案。
以管理员身份运行您的CMD。第二,也许你不安装node.js. https://nodejs.org/