【发布时间】:2014-04-18 01:02:31
【问题描述】:
在从 git 构建 yeoman 项目结账时面临问题。我正在尝试对 yeoman 项目进行 git checkout 并运行 grunt serve。以下是错误描述的场景
场景描述:
Person1 使用 yo angular 创建了 yeoman angularjs 项目。 grunt serve 在 Person1 的计算机上运行良好。 Person1 将代码推送到 git,以便其他团队成员可以使用它。
Person2 检出 git (git clone ) 时会出现问题。签出副本中的 grunt serve 命令会出现以下错误:
$ grunt serve
grunt-cli: The grunt command line interface. (v0.1.13)
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
我试过了:npm install grunt
我收到以下错误:
grunt serve
Loading "Gruntfile.js" tasks...ERROR
>> Error: Cannot find module 'load-grunt-tasks'
Warning: Task "serve" not found. Use --force to continue.
Aborted due to warnings.
使用的工具:
$ grunt -version
grunt-cli v0.1.13
grunt v0.4.4
$ yo -v
1.1.2
suraj@localhost:testing$ npm -version
1.4.4
ls -l 在目录上
drwxrwxr-x app
-rw-rw-r-- bower.json
-rw-rw-r-- Gruntfile.js
-rw-rw-r-- karma.conf.js
-rw-rw-r-- karma-e2e.conf.js
drwxrwxr-x node_modules
-rw-rw-r-- package.json
drwxrwxr-x test
我需要帮助来完成从 git checkout 构建项目的任务,以便我可以继续开发。
【问题讨论】:
标签: node.js git angularjs yeoman yeoman-generator