Step 1 – Prerequsites
Login to your Debian system using root or sudo privilege user and update the current packages to latest version.
sudo apt-get update sudo apt-get upgrade
Step 2 – Install Node.js
Bower required Node.js to be installed on the system. Use following set of commands to add node.js PPA on your Debian system and install.
sudo apt-get install software-properties-common curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install nodejs
Make sure you have successfully installed node.js and NPM on your system
node --version npm --version
Step 3 – Install Bower on Debian
After installation of node.js and npm on your system. Use the following commands to install Bower on Debian.
sudo npm install -g bower
The Bower has been installed. Let’s check the installed version of bower on your system using the following command.
bower --version 1.8.8
Step 4 – Using Bower
To install a package using bower run command as:
bower install PACKAGE_NAME
You can also create a bower.json file for your package using bower init. At runtime you can use
--save option to save new installed packages bower.json to your using the following command.
bower install PACKAGE_NAME --save
Here are some more useful commands for bower to install and manage packages:
## Install all packages from bower.json bower install ## Install Registered packages bower install PACKAGE_NAME ## Using the github in shortform bower install github_user/package ## Using complete git endpoint bower install git://github.com/user/package.git ## From HTTP URL bower install http://example.com/script.js