Getting grunt.js to work on a pre-existing yeoman project

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…

  • How do I revert a pushed commit back to being unstaged?
  • Unable to copy all but ~ -files and .gitconfig to Git -repo
  • Rebasing a Git merge commit
  • git: fatal: index-pack failed
  • Publishing on GitHub a Polymer component with multiple sub components
  • Cannot trigger post-commit git hook on git submodule
  • 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.

  • How git branches and tags are stored in disks?
  • Credentials issue on Windows slave node fetching from Git repo
  • Can you specify which svn branches with git svn?
  • Can multiple Gitlab projects use the same Git repository?
  • The concept of snapshot
  • The GitHub.app for Mac crashes every time, if a local repository is loaded
  • 3 Solutions collect form web for “Getting grunt.js to work on a pre-existing yeoman project”

    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!

    You will need to install some https://github.com/gruntjs/grunt-contrib packages. The gruntserver output (installed as Scott’s answer) will tell you what are the missing ones

    Git Baby is a git and github fan, let's start git clone.