7

I am trying to install grunt. According to this article all I should need to do is run

npm install -g grunt

After I run this command it appears to succeed and all dependencies are installed. When I then try to run grunt, I get command not found.

I am on Ubuntu 12.04.

citizen conn
  • 15,300
  • 3
  • 58
  • 80
  • 10
    You need to install `grunt-cli` globally, and `grunt` locally: `npm install -g grunt-cli` and `npm install grunt`. – Rob W Mar 19 '13 at 22:27
  • Installing the grunt cli worked. Thank you. This is not documented anywhere. – citizen conn Mar 19 '13 at 22:30
  • 4
    It's documented on the [getting started](http://gruntjs.com/getting-started) page of the Grunt website. Which is a good place to, well, start. – drzax Mar 20 '13 at 04:00
  • Dupe of http://stackoverflow.com/questions/10667381/node-package-grunt-installed-but-not-available - great answer there. – Air May 30 '14 at 13:09

1 Answers1

13

Rob W already answered this. But I'll post it here to be more clear. Please Rob, if you want to answer I can remove this.

You've to install grunt-cli globally:

sudo npm install -g grunt-cli

santiagobasulto
  • 11,320
  • 11
  • 64
  • 88