2016-11-06 188 views
0

我试图安装离子和科尔多瓦(像以前很多次 - 没有任何问题),它没有奏效。 总是有这样的:npm ERR!代码ENOENT安装错误离子科尔多瓦

npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\n 
pm-cli.js" "install" "-g" "cordova" "ionic" 
npm ERR! node v7.0.0 
npm ERR! npm v3.10.8 
npm ERR! path C:\Users\Bastian\AppData\Roaming\npm\node_modules\.staging\abbrev-d5384ff1 
npm ERR! code ENOENT 
npm ERR! errno -4058 
npm ERR! syscall rename 

我试了几个版本的Node.js和NPM缓存清理。但遗憾的是,没有任何结果。

下面是来自NPM-一些的debug.log行:

72036 silly gunzTarPerm modified mode [ 'node_modules/ionic-app-lib/node_modules/cordova-lib/node_modules/npm/node_modules/request/node_modules/aws-sign2/index.js', 
72036 silly gunzTarPerm 420, 
72036 silly gunzTarPerm 438 ] 
72037 silly gunzTarPerm extractEntry node_modules/ionic-app-lib/node_modules/cordova-lib/node_modules/npm/node_modules/request/node_modules/bl/package.json 
72038 silly gunzTarPerm modified mode [ 'node_modules/ionic-app-lib/node_modules/cordova-lib/node_modules/npm/node_modules/request/node_modules/bl/package.json', 
72038 silly gunzTarPerm 420, 
72038 silly gunzTarPerm 438 ] 





81575 error Windows_NT 6.3.9600 
81576 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" "ionic" 
81577 error node v6.9.1 
81578 error npm v3.10.8 
81579 error path C:\Users\Bastian\AppData\Roaming\npm\node_modules\.staging\abbrev-d5384ff1 
81580 error code ENOENT 
81581 error errno -4058 
81582 error syscall rename 
81583 error enoent ENOENT: no such file or directory, rename 'C:\Users\Bastian\AppData\Roaming\npm\node_modules\.staging\abbrev-d5384ff1' -> 'C:\Users\Bastian\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev' 
81584 error enoent ENOENT: no such file or directory, rename 'C:\Users\Bastian\AppData\Roaming\npm\node_modules\.staging\abbrev-d5384ff1' -> 'C:\Users\Bastian\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev' 
81584 error enoent This is most likely not a problem with npm itself 
81584 error enoent and is related to npm not being able to find a file. 
81585 verbose exit [ -4058, true ] 

有任何人的想法可能是什么问题?谢谢!

+0

您是否检查该文件夹是否存在C:\ Users \ Bastian \ AppData \ Roaming \ npm \ node_modules \?尝试在管理员模式下运行它'cmd'(如果尚未),并查看它是否与安全问题有关。 – Searching

+0

是的,该文件夹存在(包含子文件夹:cordova,firebase-tools,ionic)。 cmd在管理员模式下没有区别 – bastifix

+0

什么是您的nodejs/npm版本,您是如何安装的? – Marko

回答

0

我遇到了同样的问题!我认为这是缓存问题。我删除'C:\ Users \ Username.cordova'目录,然后转到'C:\ Users \ Username \ AppData \ Roaming \ npm \ node_modules \',我删除了cordova目录。然后再次运行“npm install -g cordova”,它适用于我!我希望它可以帮助!

+0

是的,谢谢!删除这些目录使它! – bastifix

0

得到了同样的错误。似乎有一些版本不匹配问题。即使我们尝试安装节点和npm的最新版本,但npm intsall cordova未能提供错误4058.因此,最好重新开始。

npm install [email protected] -g 
npm cache clean 
npm unistall -g cordova 
npm intsall -g cordova 

这解决了我的问题。

相关问题