建立从git的结帐自耕农项目 [英] Build yeoman project from git checkout

查看:157
本文介绍了建立从git的结帐自耕农项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在面临从混帐建设项目自耕农结帐的问题。我试图把自耕农项目混帐签出,并运行咕噜服务。以下是其次的错误描述场景

Am facing issue in building the yeoman project checkout from git. Am trying to take git checkout of yeoman project and run grunt serve. Following is the scenario followed by error description

场景描述:

Person1是使用创建的自耕农angularjs项目的哟角咕噜服务工作正常在 Person1是的电脑。 Person1是推code与git,以便其他团队成员可以进行这项工作。

Person1 created the yeoman angularjs project using yo angular. grunt serve is working fine in Person1's computer. Person1 pushes the code to git so other team members can work on it.

PERSON2 取的git的结帐发生问题( git的克隆LT; URL> )。在咕噜服务在检出的副本命令会给出以下错误:

Problem occurs when Person2 takes a checkout of the git (git clone < URL>). The grunt serve command in the checked out copy will give following error :

$ 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安装咕噜

我得到了以下错误:

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命令的目录

ls -l on the directory

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

我需要在完成从建设混帐签出项目,所以我可以继续发展的任务的帮助。

I need help in accomplishing the task of building the project from git checkout so I could carry on the development.

推荐答案

执行一个简单的 NPM安装的应用程序的目录里。

Execute a simple npm install inside the App-Directory.

问题是:
自耕农-Projcet有很多NPM-的依赖,不仅咕噜本身,而且所有的呼噜声任务和发电机。当然,你不会要你的资料库中的所有这些软件包。那是在的package.json文件进来:它列出承滴盘项目depents的包。 NPM安装读取的package.json,并自行安装所有需要的软件包。

The Problem is: The Yeoman-Projcet has lots of npm-dependencies, not only grunt itself, but also all of grunts tasks and generators. But of course you wouldnt want all those packages inside your repository. Thats were the "package.json" File comes in: It Lists alls Packages the Project depents on. npm install reads the package.json and installs all needed packages by itself.

要正常运行应用程序,您还需要执行亭子安装
鲍尔是在前端,包什么NPM是节点。 亭子安装查找相关的软件包bower.json - 文件并进行安装。

To run the app properly, you will also need to execute bower install. Bower is for the Frontend-Packages what npm is for node. "bower install" looks for the dependent packages in the "bower.json"-File and installs them.

这篇关于建立从git的结帐自耕农项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆