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?
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:
grunt
locally in your application.grunt-cli
globally.Then, you can run grunt
from anywhere as expected :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With