在Windows 10上安装cordova的错误

时间:2016-08-25 16:12:19

标签: cordova npm installation

我想在我的开发机器上安装最新的稳定版cordova。

但安装失败,并在需要更新的minimatch上发出警告。所以我更新到npm v3,它安装了3.10.6。现在我得到了一个不同的错误,但仍然有关于minimatch的警告。谁能告诉我我做错了什么? npm v3是最新的稳定版本还是我设法安装了测试版?

我在npm和cordova上尝试了clean命令,我以管理员身份运行控制台

$ npm install -g cordova
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
C:\Users\Acuity\AppData\Roaming\npm
`-- (empty)

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Acuity\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova"
npm ERR! node v4.5.0
npm ERR! npm  v3.10.6
npm ERR! path C:\Users\Acuity\AppData\Roaming\npm\node_modules\.staging\abbrev-a6a00b47
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Acuity\AppData\Roaming\npm\node_modules\.staging\abbrev-a6a00b47' -> 'C:\Users\Acuity\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Acuity\AppData\Roaming\npm\node_modules\.staging\abbrev-a6a00b47' -> 'C:\Users\Acuity\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Acuity\npm-debug.log
npm ERR! code 1

1 个答案:

答案 0 :(得分:0)

我卸载了所有节点模块和nodejs,并以空白环境启动,现在可以正常工作