Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt installation in mac os

I want to create angular js app using bootstrap, for that I installed node.js pkg file in my mac. Afterwards I installed yeoman ($sudo npm install --global yo). Documentation says if we install yo then we get grunt and bower automatically installed. In my case grunt and bower are not being installed.

So I decided to install it externally. I used following commands:

$sudo npm install -g bower => it works perfectly and giving me all files and packages.

$ sudo npm install -g grunt => it works perfectly but not giving me all files and packages

grunt are installed on path of usr/local/lib/node_modules/grunt grunt folder contains files

constributing.md
licenses-mit
readme
aaveyor.yml
internal-tasks
lib
node_modules
package.json

Which files I am missing?

If I run command $ grunt --version then I got following error

-bash: /grunt: No such file or directory

How to resolve this?

like image 812
Tirth Avatar asked Oct 07 '14 09:10

Tirth


1 Answers

You have to run:

$ npm install -g grunt-cli

The global binary command-line tool is grunt-cli, not grunt. It's a little bit confusing in the beginning, as grunt-cli provides a global binary which is callable by grunt.

So, in the end:

  • Install grunt locally in your application.
  • Install grunt-cli globally.

Then, you can run grunt from anywhere as expected :-)

like image 121
Golo Roden Avatar answered Sep 30 '22 16:09

Golo Roden