我已经按照此处的说明安装了MEAN.IO:http://mean.io/#!/docs
沿着这条线,我确实在安装过程中看到了一些错误,我不得不在全局范围内手动安装 grunt-cli。
当我创建一个 testapp 并运行 grunt 时,这是我的输出:
MEAN:~/testApp$ grunt
Running "clean:0" (clean) task
Running "jshint:all" (jshint) task
packages/slack/server/routes/slack.js
2 |var posts = require("../controllers/posts");
^ Strings must use singlequote.
11 | });
^ Missing semicolon.
11 | });
^ Expected an identifier and instead saw ')'.
11 | });
^ Expected an assignment or function call and instead saw an expression.
22 |};
^ Expected '(end)' and instead saw '}'.
14 | app.get('/slack/all', auth.requiresLogin, function(req, res, next){
^ 'app' is not defined.
14 | app.get('/slack/all', auth.requiresLogin, function(req, res, next){
^ 'auth' is not defined.
15 | Slack.render('index', {
^ 'Slack' is not defined.
>> 8 errors in 47 files
Warning: Task "jshint:all" failed. Use --force to continue.
Aborted due to warnings.
这里出了什么问题?
为了完整起见,这里是我的版本:
MEAN:~/testApp$ mean -v && npm -v && node -v
0.5.7
1.4.14
v0.10.29