咕噜的意外的令牌:错误 [英] grunt Unexpected token : error

查看:88
本文介绍了咕噜的意外的令牌:错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循 http://gruntjs.com/getting-started 在我的Ubuntu 11.10上安装grunt 。当我跑出咕噜,我得到这个错误:

I followed http://gruntjs.com/getting-started to install grunt on my Ubuntu 11.10. When I ran grunt, I got this error:

/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。我正在升级到最新的咕噜声。这似乎与我的项目没有关系。我得到这个错误在任何目录。

I previously used grunt 0.3.16. I am upgrading to the latest grunt. It doesn't seem to be related to my project. I get this error in any directory.

推荐答案

原来我没有正确安装node.js。我只是解开node.js二进制文件并将其添加到我的路径中。我想这就是为什么它不起作用。我下载了node.js源代码,使用make进行编译和安装,现在它可以工作。感谢您的所有评论。

It turns out I didn't install node.js correctly. I simply untar the node.js binary and added it to my path. I guess that is why it didn't work. I download the node.js source, compiled and installed it using make, and it works now. Thanks for all your comments.

这篇关于咕噜的意外的令牌:错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆