所有。我一直在尝试在我的Windows 10 PC上安装Apache Cordova,而且我一直在反复讨论这个问题。我一直在关注这三个指南来安装Cordova: cordova.apache.org/docs/en/latest/guide/platforms/android/index.html
evothings.com/doc/build/cordova-install-windows.html
www.tutorialspoint.com/cordova/cordova_environment_setup.htm
我检查了命令行,Git,Android Studio和JDK都已成功安装,就像所要求的教程一样,我在SO上看了一些类似的帖子,答案是使用“sudo npm install - g cordova“以及this post并没有运气。 这是我一直在犯的错误:
npm WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3 \registry.npmjs.org\path-parse\-\path-parse-1.0.5.tgz.2712739132' -> 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\path-parse\-\path-parse-1.0.5.tgz'
npm ERR! Windows_NT 10.0.14393
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 v6.10.3
npm ERR! npm v3.10.10
npm ERR! tarball.destroy is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\tty-browserify\-\tty-browserify-0.0.0.tgz.1810143622' -> 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\tty-browserify\-\tty-browserify-0.0.0.tgz'
npm ERR! Windows_NT 10.0.14393
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 v6.10.3
npm ERR! npm v3.10.10
npm ERR! tarball.destroy is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm WARN retry will retry, error on last attempt: Error: EBUSY: resource busy or locked, rename 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\tty-browserify\-\tty-browserify-0.0.0.tgz.709475096' -> 'C:\Users\Ray\AppData\Local\Temp\npm-7756-015c0ec3\registry.npmjs.org\tty-browserify\-\tty-browserify-0.0.0.tgz'
npm ERR! Windows_NT 10.0.14393
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 v6.10.3
npm ERR! npm v3.10.10
npm ERR! tarball.destroy is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
答案 0 :(得分:0)
我相信系统中运行的某些防病毒软件可能会导致此问题。尝试停止反病毒程序并安装cordova。
此问题的另一个可能的解决方法可能是安装最新版本的nodejs。