How to Mac
In this tutorial we will learn to install Bower on Mac using Node and NPM.
Homebrew is "The missing package manager for macOS". Open terminal and type the following command.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Now we need to install Node and NPM on Mac using Homebrew. Use the following command in the terminal.
$ brew install node
Click here for more details on how to install NodeJS on Mac using Homebrew.
Once Node is installed then type the following command in the terminal to get the version of node.
$ node -v
NPM is the Node Package Manager and it is installed along with Node. So, to check the version of the NPM type the following command.
$ npm -v
Bower is "A package manager for the web".
To install Bower open terminal and type the following command.
$ npm install -g bower
This will install bower globally in your system.
Output
YUSUF-MacBook-Pro:~ yusufshakeel$ npm install -g bower
/usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower
/usr/local/lib
└── bower@1.8.0
To check which version of bower is installed type the following command in the terminal.
$ bower -v
Output
YUSUF-MacBook-Pro:~ yusufshakeel$ bower -v
1.8.0
Congratulation! You have successfully installed Bower on your Mac. Have fun coding.
ADVERTISEMENT