Installing Grunt on OSX, Simply

Getting to a point where you can install Grunt and use it effectively is a lot easier than it used to be back in the day but still not without it’s flaws, at least not on OSX.

I’m really writing this as a log for my own benefit but this is the quickest way I’ve managed to do things.

First install Node.js

Next up is Grunt. Please don’t use sudo to install Grunt or anything to do with Grunt. Instead take ownership of your usr files with the following command.

sudo chown -R $USER /usr/local

Now you should be able to install Grunt CLI globally without using sudo or multiple crazy error messages. Just use the command below.

npm install -g grunt-cli

And there we go, we can crack on using gruntfiles as required, assuming you’ve installed grunt locally via your package.json…

Yeah, I’m still not convinced that this is a good idea. However, this is way, way easier than it used to be and I don’t feel like I’ve sullied my OS just to install a command line tool.

Let’s give it a whirl!

References:

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.