2

In my project directory, I installed Grunt by using the following command:

npm install grunt

...after that I did Grunt server in my project directory but it gives me command not found error.

Raj$ grunt server
-bash: grunt: command not found

And:

npm install grunt
npm WARN package.json BID-2.0@0.0.0 No description
npm WARN package.json BID-2.0@0.0.0 No repository field.
npm WARN package.json BID-2.0@0.0.0 No README data

How can I fix it?

vdenotaris
  • 13,297
  • 26
  • 81
  • 132

2 Answers2

6

You need to install Grunt's command line interface (CLI) globally as well.

From their site:

npm install -g grunt-cli

You may need to use sudo command (for OSX, *nix, BSD etc) or run your command shell as Administrator (for Windows) to do this.

This will put the grunt command in your system path, allowing it to be run from any directory.

vdenotaris
  • 13,297
  • 26
  • 81
  • 132
Herald Smit
  • 2,342
  • 1
  • 22
  • 28
0

You will have to install grunt after installing node / npm with: npm install -g grunt. Then it will be available at the cmd.

Dimitrios
  • 11
  • 4