Error bower is not recognized as an internal or external command operable program or batch file

0 votes

 I have re-installed the Node JS, NPM and the problem started. After I install a module like example npm install -g bower, the module gets installed successfully but bower -v gives

'bower' is not recognized as an internal or external command, operable program or batch file.

I have checked the installation path C:\Users\XXXXX\AppData\Roaming\npm\node_modules which has all the old installed modules. I have tried to uninstall them and reinstall the modules, but still I am getting the same error.

Even I have deleted the entire folder and installed all the modules again but the result is same.

I don't know why I am getting this error after reinstalling NodeJS NPM.

Oct 14, 2020 in Node-js by kartik
• 37,510 points
4,878 views

1 answer to this question.

0 votes

Hello @kartik,

Fixed it by adding the 'npm' directory to my PATH:

Right click 'My Computer' and go to 'Properties > Advanced System Settings > Environment Variables'.

Double click on PATH under the 'User variables for Username' section, and add 'C:\Users\niroj/AppData\Roaming\npm' obviously replacing 'username' with yours.

Restart your console window or IDE and you should get a response from the bower command.

Hope it helps!!

Thank You!!

answered Oct 14, 2020 by Niroj
• 82,880 points

Related Questions In Node-js

+1 vote
0 answers
0 votes
1 answer

Error:nvm is not compatible with the npm config "prefix" option:

Hello @kartik, After installing nvm using brew, create ~/.nvm directory: $ ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,880 points
4,225 views
0 votes
1 answer

Error:sudo: npm: command not found

Hello @kartik, I had the same problem; here ...READ MORE

answered Jul 15, 2020 in Node-js by Niroj
• 82,880 points
12,001 views
0 votes
1 answer

How to execute an external program from within Node.js?

Hello @kartik, Exec has memory limitation of buffer ...READ MORE

answered Jul 17, 2020 in Node-js by Niroj
• 82,880 points
3,711 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27, 2020 in Java-Script by Niroj
• 82,880 points
3,719 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5, 2020 in Java-Script by Niroj
• 82,880 points
2,927 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,880 points
836 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,880 points
774 views
0 votes
1 answer

Error:“NODE_ENV” is not recognized as an internal or external command, operable command or batch file

Hello @kartik, It sounds like your error comes ...READ MORE

answered Jul 16, 2020 in Node-js by Niroj
• 82,880 points
19,440 views
0 votes
1 answer

Error:node' is not recognized as an internal or external command

Hello @kartik, Node is missing from the SYSTEM ...READ MORE

answered Oct 15, 2020 in Node-js by Niroj
• 82,880 points
7,560 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP