无法在WebStorm 8中安装Grunt软件包:
Install packages failed: Error occurred when installing package grunt.
记录:
Install packages failed: Error occurred when installing package grunt.
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" install grunt
Exit code: 1
标准错误:
npm ERR! Error: Invalid version: "0.1"
npm ERR! at Object.module.exports.fixVersionField (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\node_modules\normalize-package-data\lib\fixer.js:183:13)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\node_modules\normalize-package-data\lib\normalize.js:30:38
npm ERR! at Array.forEach (native)
npm ERR! at normalize (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\node_modules\normalize-package-data\lib\normalize.js:29:15)
npm ERR! at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:342:33)
npm ERR! at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:126:33)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:328:57
npm ERR! at fs.js:207:20
npm ERR! at OpenReq.Req.done (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:144:5)
npm ERR! at OpenReq.done (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:64:22)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt"
npm ERR! cwd C:\Users\ID25\Desktop\untitled1
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm`
请帮助我!!!
答案 0 :(得分:0)
请检查你的package.json - 什么是“版本”值? '0.1'不是有效值,因为它不符合npm包使用的版本控制方案(http://semver.org/)。见https://www.npmjs.org/doc/json.html