How to Install Bower 1.8.8 using NPM on CentOS 7.6

Installation of Bower 1.8.8 using npm On CentOS 7.6

As websites are made of lot of things like frameworks.libraries,assets and utilities.

Bower manages all of these things.Bower is a package manager for web and dependency management tool which is built by Twitter. Bower manages the front-end components like html,css,js.It reduces the time and energy you need to spend hunting around the web for libraries like Susy and jQuery.Bower helps you to install update or delete the libraries within a single command.Bower depends on nodejs and npm .Bower packages sometimes relies on git so ensure you installed it on your system .This video covers the method to install bower 1.8.8 using npm on CentOS 7.6.

Dependencies

gcc-c++ make git

NodeJS latest version

curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash –

Installation Procedure

Install the dependencies that are required for nodejs

[root@linuxhelp ~]# yum install git gcc-c++ make -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.dhakacom.com
* extras: mirror.dhakacom.com
* updates: mirror.dhakacom.com
base                                                                                                                   | 3.6 kB  00:00:00     
extras                                                                                                                 | 3.4 kB  00:00:00     
extras/7/x86_64/primary_db                                                                                             | 205 kB  00:00:01     
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check

Installed:
 gcc-c++.x86_64 0:4.8.5-36.el7_6.2                                        git.x86_64 0:1.8.3.1-20.el7                                       

Dependency Installed:
 cpp.x86_64 0:4.8.5-36.el7_6.2               gcc.x86_64 0:4.8.5-36.el7_6.2              libstdc++-devel.x86_64 0:4.8.5-36.el7_6.2          
 perl-Error.noarch 1:0.17020-2.el7           perl-Git.noarch 0:1.8.3.1-20.el7           perl-TermReadKey.x86_64 0:2.30-20.el7              

Dependency Updated:
 libgcc.x86_64 0:4.8.5-36.el7_6.2             libgomp.x86_64 0:4.8.5-36.el7_6.2             libstdc++.x86_64 0:4.8.5-36.el7_6.2            

Complete!

Download the latest node package manager by executing the following command

 [root@linuxhelp ~]# curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
## Installing the NodeSource Node.js 10.x repo...


## Inspecting system...

+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
+ uname -m

## Confirming "el7-x86_64" is supported...

+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

## Downloading release setup RPM...

+ mktemp
+ curl -sL -o '/tmp/tmp.cKCXm96fIV' 'https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

## Installing release setup RPM...

+ rpm -i --nosignature --force '/tmp/tmp.cKCXm96fIV'

## Cleaning up...

+ rm -f '/tmp/tmp.cKCXm96fIV'

## Checking for existing installations...

+ rpm -qa 'node|npm' | grep -v nodesource

## Run `sudo yum install -y nodejs` to install Node.js 10.x and npm.
## You may also need development tools to build native addons:
     sudo yum install gcc-c++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
     sudo yum install yarn

Install node.js by executing the following command

[root@linuxhelp ~]# yum install nodejs -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.dhakacom.com
 * extras: mirror.dhakacom.com
 * updates: mirror.dhakacom.com
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 2:10.16.0-1nodesource will be installed
--> Finished Dependency Resolution
.
.
.
.
.
Installed:
  nodejs.x86_64 2:10.16.0-1nodesource                                                                                                         

Complete!

Check the version of node

[root@linuxhelp ~]# node -v
v10.16.0

Verify the version of npm by executing the following command

 [root@linuxhelp ~]# npm -v
6.9.0

Install bower using npm as follows

 [root@linuxhelp ~]# npm install -g bower
npm WARN deprecated bower@1.8.8: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower
+ bower@1.8.8
added 1 package from 1 contributor in 9.009s

Verify the version of bower by executing the following command

 [root@linuxhelp ~]# bower --version
1.8.8

With this,Installation of bower 1.8.8 version using npm On CentOS 7.6 comes to end here

Tag : Bower npm CentOS
FAQ
Q
How to search for a package using bower?
A
bower search is the command to search for a package using bower.
Q
Does bower check for dependencies and compatibilities?
A
Yes,bower check for dependencies and compatibilities
Q
What does package manager do in bower?
A
Bower Package manager is a tool for keeping track of what you've installed,installing and upgrading packages
Q
IS bower a package manager?
A
Yes,Bower is a package manager.
Q
What does the framework mean in Bower?
A
In Bower,Frameworks are large bodies of pre-written code to which you add your own code to solve a problem in a specific domain