I have a working yeoman project, which I run the server with grunt server
, it works fine.
I put the entire thing into a git repo, and checked it out to a new folder...
when I try doing 'grunt server' it says:
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.
I am having trouble getting grunt installed locally to that directory, and being able to locate and use the GruntFile.
Assuming that the Grunt CLI has been installed and that the project has already been configured with a package.json and a Gruntfile, it's very easy to start working with Grunt: Change to the project's root directory. Install project dependencies with npm install. Run Grunt with grunt.
Because of this, you can run grunt from any subfolder in your project. If a locally installed Grunt is found, the CLI loads the local installation of the Grunt library, applies the configuration from your Gruntfile, and executes any tasks you've requested for it to run.
If you work in a team environment that means you can work with a set of unified commands and everyone will share a common workflow. Grunt.js uses power of Node.js to work and it runs from your command line. All the configuration is done in regular Javascript (or CoffeeScript).
It allows for rapidly getting started on new projects and streamlines the maintenance of existing projects. Yeoman is language agnostic. It can generate projects in any language (Web, Java, Python, C#, etc.) Yeoman by itself doesn’t make any decisions.
After you check out a Yeoman project, you need to install the npm modules and bower components like you did after the initial scaffolding process, as they are not part of the git repository:
npm install & bower install
I just ran into this today!
By default your .gitignore will be ignoring /bower_components, node_modules, dist folder, etc.
When you pull the project from git, just be sure to run npm install, and bower install, and you should be good to go after that!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With