0
我跟着http://gruntjs.com/getting-started在我的Ubuntu 11.10上安装grunt。当我跑出咕噜声时,我得到了这个错误:grunt意外的令牌:错误
/opt/node-v0.10.0-linux-x64/lib/node_modules/grunt-cli/package.json:2
"name": "grunt-cli",
^
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
SyntaxError: Unexpected token :
at Module._compile (module.js:397:25)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
at require (module.js:346:19)
at Object.<anonymous> (/opt/node-v0.10.0-linux-x64/lib/node_modules/grunt-cli/lib/info.js:13:11)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
at Function._load (module.js:293:12)
我以前用过grunt 0.3.16。我正在升级到最新的咕噜声。这似乎与我的项目没有关系。我在任何目录中都遇到这个错误。
你用'npm uninstall -g grunt'先卸载了grunt吗? – glortho 2013-03-13 01:24:30
我做到了。我甚至重新安装了node.js来获得一个新的npm,并且仍然得到了这个。目前在我的node.js目录的lib/node_modules下,我只看到grunt-cli和npm。 – coolsuntraveler 2013-03-13 01:43:13
我也确保我目前的咕噜声是在grunt-cli/bin/grunt下运行的。 – coolsuntraveler 2013-03-13 01:57:32