不能简单的文书上士角度使用咕噜 [英] Cannot use grunt on simple Yeoman angular
问题描述
试图启动刚刚通过约曼一个简单的角度应用程序,使用本指南中的步骤
<一href=\"http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/\">http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/
Trying to just startup a simple angular app via Yeoman, using steps in this guide http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/
和在尝试运行咕噜当这个错误
或咕噜服务器
:
Loading "Gruntfile.js" tasks...ERROR
Error: Cannot find module 'load-grunt-tasks'
Warning: Task "default" not found. Use --force to continue.
下面是我的版本:
yo --version && grunt --version && bower --version
1.1.2<
grunt-cli v0.1.13
grunt v0.4.4
1.3.1
请参阅此截屏在行动:
http://screencast.com/t/4ToPw3SlL2
See screencast of this in action: http://screencast.com/t/4ToPw3SlL2
推荐答案
我刚刚遇到了同样的问题,今天,管理这里的答案,解决问题。
I just encountered the same problem today, managed to resolve it with the answers here.
基本上我需要更新NPM到最新版本,
通过使用此命令(其中附带节点v0.10.29包已经过时了NPM)
Basically I needed to update npm to latest version, by using this command (the npm which came with Node-v0.10.29 package was outdated)
npm update npm -g
或
sudo npm update npm -g (i used this command on my mac)
然后键入以下命令
Then type this command
npm --version (it should show 1.5.0-alpha-4 or later version)
然后键入咕噜服务命令
Then type the grunt serve command
grunt serve
如果您仍然有问题,然后尝试运行这些命令
If you still have issues, then try running these commands
npm install
或
sudo npm install (i used this command on my mac)
然后尝试再次哼了一声命令服务,
Then try grunt serve command again,
grunt serve
这一次,它为我工作。
如果没有,那就试试这个命令
If it didn't, then try this command
bower install (i did not have to use this command)
这篇关于不能简单的文书上士角度使用咕噜的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!