在linux中安装cordova时出现以下错误
我在cmd中输入以下命令:
sudo npm install -g cordova
获得以下错误:
npm ERR! Error: invalid version: 3001.0001.0000-dev-harmony-fb
npm ERR! at validVersion (/usr/lib/nodejs/read-package-json/read-json.js:573:40)
npm ERR! at final (/usr/lib/nodejs/read-package-json/read-json.js:323:23)
npm ERR! at /usr/lib/nodejs/read-package-json/read-json.js:139:33
npm ERR! at cb (/usr/lib/nodejs/slide/lib/async-map.js:48:11)
npm ERR! at /usr/lib/nodejs/read-package-json/read-json.js:251:40
npm ERR! at fs.js:268:14
npm ERR! at /usr/lib/nodejs/graceful-fs/graceful-fs.js:103:5
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/srtpl13/Sites/npm-debug.log npm
npm ERR! System Linux 3.11.0-15-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "cordova"
npm ERR! cwd /home/srtpl13/Sites
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/srtpl13/Sites/npm-debug.log
npm ERR! not ok code 0
请帮我解决这个问题。
提前致谢!
答案 0 :(得分:0)
请检查您的互联网连接或通过CMD ping。