npm下载phonegap多个错误

时间:2015-09-17 10:47:45

标签: node.js cordova npm

我试图从命令行下载npm的phonegap,我总是得到节点版本错误:4.0.0和4.1.0具体: this

我在公司代理服务器上,我无法更改连接。 现在将节点版本更改为:0.10.0我得到了这些错误:

npm ERR! Error: ENOENT, open 'C:\Documents and Settings\gcappella\node_modules\p
honegap\node_modules\prompt\node_modules\utile\node_modules\mkdirp\test\return_s
ync.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\\Programmi\\nodejs\\\\node.exe" "C:\\Programmi\\nodejs\\nod
e_modules\\npm\\bin\\npm-cli.js" "install" "phonegap"
npm ERR! cwd C:\Documents and Settings\gcappella
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! path C:\Documents and Settings\gcappella\node_modules\phonegap\node_mod
ules\prompt\node_modules\utile\node_modules\mkdirp\test\return_sync.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Documents and Settings\g
cappella\node_modules\phonegap\node_modules\prompt\node_modules\utile\node_modul
es\i\test\inflector'
npm ERR! error rolling back  utile@0.2.1 { [Error: ENOTEMPTY, rmdir 'C:\Document
s and Settings\gcappella\node_modules\phonegap\node_modules\prompt\node_modules\
utile\node_modules\i\test\inflector']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Documents and Settings\\gcappella\\node
_modules\\phonegap\\node_modules\\prompt\\node_modules\\utile\\node_modules\\i\\
test\\inflector' }
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Documents and Settings\g
cappella\node_modules\phonegap\node_modules\prompt\node_modules\utile\node_modul
es\i\test\inflector'
npm ERR! error rolling back  prompt@0.2.11 { [Error: ENOTEMPTY, rmdir 'C:\Docume
nts and Settings\gcappella\node_modules\phonegap\node_modules\prompt\node_module
s\utile\node_modules\i\test\inflector']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Documents and Settings\\gcappella\\node
_modules\\phonegap\\node_modules\\prompt\\node_modules\\utile\\node_modules\\i\\
test\\inflector' }
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Documents and Settings\g
cappella\node_modules\phonegap\node_modules\prompt\node_modules\utile\node_modul
es\ncp\test'
npm ERR! error rolling back  ncp@0.4.2 { [Error: ENOTEMPTY, rmdir 'C:\Documents
and Settings\gcappella\node_modules\phonegap\node_modules\prompt\node_modules\ut
ile\node_modules\ncp\test']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Documents and Settings\\gcappella\\node
_modules\\phonegap\\node_modules\\prompt\\node_modules\\utile\\node_modules\\ncp
\\test' }
npm ERR! Error: ENOENT, lstat 'C:\Documents and Settings\gcappella\node_modules\
phonegap\node_modules\prompt\node_modules\utile\node_modules\i\test\inflector\me
thods-test.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\\Programmi\\nodejs\\\\node.exe" "C:\\Programmi\\nodejs\\nod
e_modules\\npm\\bin\\npm-cli.js" "install" "phonegap"
npm ERR! cwd C:\Documents and Settings\gcappella
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! path C:\Documents and Settings\gcappella\node_modules\phonegap\node_mod
ules\prompt\node_modules\utile\node_modules\i\test\inflector\methods-test.js
npm ERR! fstream_path C:\Documents and Settings\gcappella\node_modules\phonegap\
node_modules\prompt\node_modules\utile\node_modules\i\test\inflector\methods-tes
t.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack C:\Programmi\nodejs\node_modules\npm\node_modules\fstream
\lib\writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:93:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Documents and Settings\g
cappella\node_modules\phonegap\node_modules\connect-phonegap\res\middleware\cord
ova'
npm ERR! error rolling back  phonegap@5.3.1+cordova.5.3.1 { [Error: ENOTEMPTY, r
mdir 'C:\Documents and Settings\gcappella\node_modules\phonegap\node_modules\con
nect-phonegap\res\middleware\cordova']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Documents and Settings\\gcappella\\node
_modules\\phonegap\\node_modules\\connect-phonegap\\res\\middleware\\cordova' }
npm ERR! Error: No compatible version found: glob@'^5.0.14'
npm ERR! Valid install targets:
npm ERR! ["1.1.0","2.0.9","2.0.8","2.0.7","2.1.0","3.0.0","3.0.1","3.1.0","3.1.1
","3.1.2","3.1.3","3.1.4","3.1.5","3.1.6","3.1.7","3.1.9","3.1.10","3.1.11","3.1
.12","3.1.13","3.1.14","3.1.15","3.1.16","3.1.17","3.1.18","3.1.19","3.1.20","3.
1.21","3.2.0","3.2.1","3.2.3","3.2.4","3.2.5","3.2.6","3.2.7","3.2.8","3.2.9","3
.2.10","3.2.11","4.0.0","4.0.1","4.0.2","4.0.3","4.0.4","4.0.5","4.0.6","4.1.2-b
eta","4.1.2","4.1.3","4.1.4","4.1.5","4.1.6","4.2.0","4.2.1","4.2.2","4.3.0","4.
3.1","4.3.2","4.3.3","4.3.4","4.3.5","4.4.0","4.4.2","4.5.0","5.0.0","4.5.1","5.
0.1","4.5.2","5.0.2","4.5.3","5.0.3","5.0.4","5.0.5","5.0.6","5.0.7","5.0.9","5.
0.10","5.0.11","5.0.12","5.0.13","5.0.14"]
npm ERR!     at installTargetsError (C:\Programmi\nodejs\node_modules\npm\lib\ca
che.js:682:10)
npm ERR!     at C:\Programmi\nodejs\node_modules\npm\lib\cache.js:597:10
npm ERR!     at saved (C:\Programmi\nodejs\node_modules\npm\node_modules\npm-reg
istry-client\lib\get.js:138:7)
npm ERR!     at Object.oncomplete (fs.js:93:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\\Programmi\\nodejs\\\\node.exe" "C:\\Programmi\\nodejs\\nod
e_modules\\npm\\bin\\npm-cli.js" "install" "phonegap"
npm ERR! cwd C:\Documents and Settings\gcappella
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm http GET http://registry.npmjs.org/wordwrap
npm http GET http://registry.npmjs.org/request
npm http 304 http://registry.npmjs.org/request
npm http 200 http://registry.npmjs.org/wordwrap
npm http GET http://registry.npmjs.org/request/-/request-2.11.4.tgz
npm http 200 http://registry.npmjs.org/request/-/request-2.11.4.tgz
npm http GET http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz
npm http 200 http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz
npm http GET http://registry.npmjs.org/abbrev
npm http 200 http://registry.npmjs.org/abbrev
npm http GET http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz
npm http 200 http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz
npm http GET http://registry.npmjs.org/shelljs/0.3.0
npm http GET http://registry.npmjs.org/semver
npm http GET http://registry.npmjs.org/cordova-js/4.1.1
npm http GET http://registry.npmjs.org/tar/1.0.2
npm http GET http://registry.npmjs.org/cordova-registry-mapper
npm http GET http://registry.npmjs.org/unorm/1.3.3
npm http GET http://registry.npmjs.org/cordova-serve
npm http GET http://registry.npmjs.org/valid-identifier/0.0.1
npm http GET http://registry.npmjs.org/dep-graph/1.1.0
npm http GET http://registry.npmjs.org/osenv/0.1.0
npm http GET http://registry.npmjs.org/npm
npm http GET http://registry.npmjs.org/xcode/0.8.0
npm http GET http://registry.npmjs.org/elementtree/0.1.6
npm http GET http://registry.npmjs.org/npmconf
npm http GET http://registry.npmjs.org/request/2.47.0
npm http GET http://registry.npmjs.org/init-package-json
npm http GET http://registry.npmjs.org/properties-parser/0.2.3
npm http GET http://registry.npmjs.org/rc/0.5.2
npm http GET http://registry.npmjs.org/glob/4.0.6
npm http GET http://registry.npmjs.org/plist/1.1.0
npm http GET http://registry.npmjs.org/aliasify
npm http GET http://registry.npmjs.org/bplist-parser/0.0.6
npm http GET http://registry.npmjs.org/cordova-app-hello-world/3.9.0
npm http 200 http://registry.npmjs.org/cordova-registry-mapper
npm http 200 http://registry.npmjs.org/shelljs/0.3.0
npm http 200 http://registry.npmjs.org/cordova-js/4.1.1
npm http GET http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registr
y-mapper-1.1.11.tgz
npm http 200 http://registry.npmjs.org/cordova-serve
npm http 200 http://registry.npmjs.org/semver
npm http 200 http://registry.npmjs.org/tar/1.0.2
npm http GET http://registry.npmjs.org/cordova-js/-/cordova-js-4.1.1.tgz
npm http GET http://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz
npm http 200 http://registry.npmjs.org/valid-identifier/0.0.1
npm http 200 http://registry.npmjs.org/dep-graph/1.1.0
npm http GET http://registry.npmjs.org/tar/-/tar-1.0.2.tgz
npm http 200 http://registry.npmjs.org/unorm/1.3.3
npm http 200 http://registry.npmjs.org/npmconf
npm http GET http://registry.npmjs.org/valid-identifier/-/valid-identifier-0.0.1
.tgz
npm http GET http://registry.npmjs.org/dep-graph/-/dep-graph-1.1.0.tgz
npm http GET http://registry.npmjs.org/unorm/-/unorm-1.3.3.tgz
npm http 200 http://registry.npmjs.org/osenv/0.1.0
npm http 200 http://registry.npmjs.org/request/2.47.0
npm http 200 http://registry.npmjs.org/xcode/0.8.0
npm http 200 http://registry.npmjs.org/init-package-json
npm http GET http://registry.npmjs.org/osenv/-/osenv-0.1.0.tgz
npm http GET http://registry.npmjs.org/request/-/request-2.47.0.tgz
npm http 200 http://registry.npmjs.org/elementtree/0.1.6
npm http GET http://registry.npmjs.org/xcode/-/xcode-0.8.0.tgz
npm http 200 http://registry.npmjs.org/rc/0.5.2
npm http 200 http://registry.npmjs.org/npm
npm http 200 http://registry.npmjs.org/aliasify
npm http 200 http://registry.npmjs.org/plist/1.1.0
npm http 200 http://registry.npmjs.org/glob/4.0.6
npm http 200 http://registry.npmjs.org/properties-parser/0.2.3
npm http GET http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz
npm http 200 http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registr
y-mapper-1.1.11.tgz
npm http 200 http://registry.npmjs.org/cordova-js/-/cordova-js-4.1.1.tgz
npm http 200 http://registry.npmjs.org/tar/-/tar-1.0.2.tgz
npm http 200 http://registry.npmjs.org/cordova-app-hello-world/3.9.0
npm http 200 http://registry.npmjs.org/unorm/-/unorm-1.3.3.tgz
npm http 200 http://registry.npmjs.org/valid-identifier/-/valid-identifier-0.0.1
.tgz
npm http 200 http://registry.npmjs.org/dep-graph/-/dep-graph-1.1.0.tgz
npm http 200 http://registry.npmjs.org/osenv/-/osenv-0.1.0.tgz
npm http 200 http://registry.npmjs.org/xcode/-/xcode-0.8.0.tgz
npm http 200 http://registry.npmjs.org/request/-/request-2.47.0.tgz
npm http 200 http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz
npm http GET http://registry.npmjs.org/properties-parser/-/properties-parser-0.2
.3.tgz
npm http GET http://registry.npmjs.org/glob/-/glob-4.0.6.tgz
npm http GET http://registry.npmjs.org/plist/-/plist-1.1.0.tgz
npm http 200 http://registry.npmjs.org/properties-parser/-/properties-parser-0.2
.3.tgz
npm http 200 http://registry.npmjs.org/plist/-/plist-1.1.0.tgz
npm http 200 http://registry.npmjs.org/glob/-/glob-4.0.6.tgz
npm http 200 http://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz
npm http GET http://registry.npmjs.org/rc/-/rc-0.5.2.tgz
npm http 200 http://registry.npmjs.org/rc/-/rc-0.5.2.tgz
npm http 200 http://registry.npmjs.org/bplist-parser/0.0.6
npm http GET http://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hel
lo-world-3.9.0.tgz
npm http 200 http://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hel
lo-world-3.9.0.tgz
npm http GET http://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz
npm http 200 http://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Documents and Settings\gcappella\npm-debug.log
npm ERR! not ok code 0

任何人都可以帮助一个可怜的家伙吗?

2 个答案:

答案 0 :(得分:1)

你确定这个端口8080可用吗?

尝试更改端口号,也许它会帮助你...

答案 1 :(得分:0)

npm@1.2.14非常陈旧,多年来一直没有得到支持。您的问题的关键在于,npm的旧版本不知道如何解释您在此处看到的^ semver运算符:

npm ERR! Error: No compatible version found: glob@'^5.0.14'

因此会抛出错误。解决方案是简单升级。我建议升级Node.jsnpm,因为Node.js v0.10.0也很老,使用它时你会受到一些安全漏洞的影响,这些漏洞已在中修复年自v0.10.0发布以来。