Windows上的phonegap安装错误

时间:2014-06-06 19:19:09

标签: cordova

我在Windows机器上安装手机间隙时出现此错误

C:\>npm install -g phonegap
npm http GET https://registry.npmjs.org/phonegap
npm http 200 https://registry.npmjs.org/phonegap
npm http GET https://registry.npmjs.org/phonegap/-/phonegap-3.5.0-0.20.1.tgz
npm http 200 https://registry.npmjs.org/phonegap/-/phonegap-3.5.0-0.20.1.tgz
npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/shelljs
npm http GET https://registry.npmjs.org/qrcode-terminal
npm http GET https://registry.npmjs.org/pluralize
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/prompt
npm http GET https://registry.npmjs.org/phonegap-build
npm http GET https://registry.npmjs.org/cordova-lib
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/connect-phonegap
npm http 304 https://registry.npmjs.org/shelljs
npm http 304 https://registry.npmjs.org/cordova
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/qrcode-terminal
npm http 304 https://registry.npmjs.org/pluralize
npm http 304 https://registry.npmjs.org/prompt
npm http 304 https://registry.npmjs.org/phonegap-build
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/connect-phonegap
npm http 304 https://registry.npmjs.org/cordova-lib
npm ERR! notarget No compatible version found: cordova-lib@'lorinbeer/cordova-li
b.git#pg.3.5.0'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["0.21.2","0.21.3"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ETARGET
npm ERR! Error: EPERM, open 'C:\npm-debug.log'
npm ERR!  { [Error: EPERM, open 'C:\npm-debug.log'] errno: 50, code: 'EPERM', pa
th: 'C:\\npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path C:\npm-debug.log
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, open 'C:\npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\npm-debug.log
npm ERR! not ok code 0

不知道该怎么做。请帮忙。

我尝试了很多东西,比如清除缓存和更新软件,但没有任何效果。 我安装了node.js 10.28 V

1 个答案:

答案 0 :(得分:6)

下载旧版本。我认为新版本存在问题

npm install -g phonegap@3.4