How to Install gulp and bower globally on Mac OSX

This post illustrates the procedure of installing gulp and bower, two node modules, on Mac OSX.

First, assuming you’ve already installed Homebrew on Mac, search for the correct version of node.

brew search node

The version currently recommended by nodejs organization is 4.4.7-lts. So that here we install this version.

brew install homebrew/versions/node4-lts

Then we can test whether the installation is successful by viewing the versions of node and npm.

node -v

npm -v

Here comes a trick before installing node modules gulp and bower. We have to change npm configuration as follows.

npm config set prefix /usr/local

After the above step, we can install gulp and bower respectively using the commands below.

npm install gulp -g

npm install bower -g

Now gulp and bower have already been successfully installed on your Mac. You can test by the following commands.

gulp -v

bower -v


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s