【发布时间】:2013-12-09 16:26:28
【问题描述】:
这是我第一次使用 yeoman 为 AngularJS 应用设置脚手架,我不得不承认我可能是 nodeJS、grunt 和 bower 世界的新手。
所以,这是我到目前为止所做的:
-
我确保安装了 yeoman、grunt-cli 和 angular-generator 软件包
npm install -g yo grunt-cli bower npm install -g generator-angular -
生成了我的应用
yo angular我也试过了:
yo angular --min-safe
到目前为止,al 似乎还不错。在给定的选项之间,我选择 Twitter Bootstrap 之一,没有角度依赖,并覆盖我的本地 .gitignore 文件。
毕竟,我尝试运行我的应用程序:
grunt serve
此时,grunt 抱怨它没有本地安装到项目中,所以我运行:
npm install grunt --save-dev
再次不,尝试运行应用程序:
grunt serve
这就是我被阻止的地方:
C:\Projects\what-now>grunt serve
Running "serve" task
Running "clean:server" (clean) task
Running "concurrent:server" (concurrent) task
Running "copy:styles" (copy) task
Done, without errors.
Warning:
C:\Projects\what-now\node_modules\grunt-contrib-compass\node_modules\tmp\lib\tmp.js:261
throw err;
^
TypeError: Cannot read property 'stdout' of undefined
at compile (C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\compass.js:37:10)
at C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\compass.js:68:7
at C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\lib\compass.js:121:11
at _fileCreated (C:\Projects\what-now\node_modules\grunt-contrib-compass\node_modules\tmp\lib\tmp.js:172:7)
at C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\rimraf\node_modules\graceful-fs\graceful-fs.js:53:5
at C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\rimraf\node_modules\graceful-fs\graceful-fs.js:62:5
at OpenReq.Req.done (C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\fstream\node_modules\graceful-fs\graceful-fs.js:142:5)
at OpenReq.done (C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\fstream\node_modules\graceful-fs\graceful-fs.js:64:22)
//... stack trace continues ...
查看在 compass 的 compile 方法中爆炸的代码,我发现如下:
child.stdout.pipe(process.stdout);
这让我觉得child 出于某种原因未定义,而这个变量来自对grunt.util.spawn 的调用。这是我不知所措的地方。
我是否缺少任何依赖项?我是否缺少任何配置?
信息:
- 操作系统:Windows 8 x64
- 节点:v0.10.22
【问题讨论】:
-
我很高兴您将错误的全文放入您的问题中。在我巧妙地决定破坏我的 ruby 配置后,为我省去了很多麻烦。
标签: node.js angularjs gruntjs yeoman