Node.js   发布时间:2022-04-24  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了node.js – Yeoman for Angular,那么“grunt serve”不会启动大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是我第一次使用yeoman设置AngularJS应用程序的脚手架,我不得不承认我可能是新的nodeJS,咕噜和鲍尔世界。

所以,这是我到目前为止做的:

>我确保yeoman,grunt-cli和角发电机包安装

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 ...

看看在指南针编译方法中爆炸的代码,我发现以下:

child.stdout.pipe(process.stdout);

这使我认为孩子是未定义的某种原因,这个变量来自于调用grunt.util.spawn。这是我在失去的地方。

我缺少任何依赖吗?我缺少任何配置?

信息:

>操作系统:Windows 8 x64
> node:v0.10.22

解决方法

*叹息*,对不起。

所有它需要我是写这个问题,然后弄清楚我需要安装Ruby和指南针gem。现在有道理:编译的过程不会产生。

安装Ruby之后,运行:

gem install compass

你应该很好去。

编辑:安装Ruby后,您需要确保ruby运行时文件的路径添加到您的PATH变量。 (感谢JagWire!)

大佬总结

以上是大佬教程为你收集整理的node.js – Yeoman for Angular,那么“grunt serve”不会启动全部内容,希望文章能够帮你解决node.js – Yeoman for Angular,那么“grunt serve”不会启动所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。