I'm new to Grunt. I'm trying to configure Grunt on my Mac OSX Lion.
I followed the instructions here and then created a project folder that contains the files below. When I try to run by typing "grunt" into terminal I get command not found
. I've also modified my paths sudo nano /etc/paths
in the hope that adding the path would make the task runner work but it's still not working. Can someone assist with this please?
---paths /usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/local/bin/grunt --- files node modules Gruntfile.js package.json
Installing the CLI. Run sudo npm install -g grunt-cli (Windows users should omit "sudo ", and may need to run the command-line with elevated privileges). The grunt command-line interface comes with a series of options. Use grunt -h from your terminal to show these options.
Installing a published development version Like installing a specific version of grunt, run npm install grunt@VERSION --save-dev where VERSION is the version you need, and npm will install that version of Grunt in your project folder, adding it to your package.
My fix for this on Mountain Lion was: -
npm install -g grunt-cli
Saw it on http://gruntjs.com/getting-started
I'm guessing you used Brew to install Node, so the guide here might be helpful http://madebyhoundstooth.com/blog/install-node-with-homebrew-on-os-x/.
You need to ensure that the npm/bin is in your path as it describes export PATH="/usr/local/share/npm/bin:$PATH"
. This is the location that npm will install the bin stubs for the installed packages.
The nano version will also work as described here http://architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/ but a restart of Terminal may be required to have the new path picked up.
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