Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bower is not recognised as an internal or external command

Tags:

node.js

npm

I have successfully installed nodejs, and express framework, however I downloaded bower via

npm install -g bower 

which ran successfully.

However whenever I try to install something with bower I get the error message

bower is not recognised as an internal or external command 

when I search my computer for bower or a bower.exe I cannot locate it.

like image 916
Joe Smith Avatar asked Dec 08 '14 14:12

Joe Smith


People also ask

Does bower use npm?

Bower depends on Node. js and npm. Also make sure that git is installed as some bower packages require it to be fetched and installed.

How do I install bower components?

Installing Bower Packages You can install packages with Bower the same way as you would install packages with npm. The difference is that you'll have to use the bower command instead. Bower will install the latest version of jQuery with this command. The additional --save flag tells Bower to add jQuery into your bower.

How do I know my bower version?

Bower lets you query the bower registry via the command line to find a package by a given name and then list its versions. e.g.


2 Answers

I am using Windows 7 as well and had this problem too.

After I took the steps outlined in Scott Marchant's answer, bower worked.

Find the location of your npm global binaries: npm config get prefix. This path may look something like C:\Users\username\AppData\Roaming\npm. Add the path from step 1 to your Path.

Open the Windows Control Panel, search for environment, then click on either edit environment variables for your account, or Edit the system environment variables`.

Find the variable named Path or PATH, or create one if it doesn't exist.

Paste the path from step 1 here (; delimited).

You may need to restart your command prompt window.

You should now be able to enter bower commands.

like image 81
jaycer Avatar answered Sep 18 '22 18:09

jaycer


I solved this issue using command

$ npm install -g bower 

make sure -g exist in command.

I am using os Window10.

like image 42
Kishor K Avatar answered Sep 17 '22 18:09

Kishor K