How to install grunt

I used Homebrew to install Node.js, then I used npm install to install Grunt and its dependencies, but after the installation was complete, I could not start Grunt:

 zsh: correct 'grunt' to 'grn' ÆnyaeÅ? n zsh: command not found: grunt 

What is the correct way to install Grunt so that I don't get this error?

+7
javascript npm gruntjs macos
source share
2 answers

To use Grunt on the command line, you must install the command line interface:

 npm install -g grunt-cli 

The -g flag is for installing a module around the world that will also create a PATH variable for Grunt.

+21
source share
 npm install -g grunt-cli => This will put the grunt command in your system path 
+3
source share

All Articles