$npm install grunt-cli -g
trying to check one:
$grunt -v
grunt-cli: The grunt command line interface (v1.2.0)
Fatal error: Unable to find local grunt.
If you're seeing this message, grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,
please see the Getting Started guide:
http://gruntjs.com/getting-started
More details:
$ which grunt
/usr/bin/grunt
grunt projectas for the version its shown in the command output. – George Udosen Jan 21 '17 at 11:22-gflag. It means global installation. – Serhii Jan 21 '17 at 11:27