How can I update npm on Windows

0 votes

I tried this:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

but it didn't work.

How do I do this on Windows?

Jul 13, 2020 in Node-js by kartik
• 37,520 points
6,471 views

1 answer to this question.

0 votes

Hello @kartik,

To update NPM, this worked for me:

  • Navigate in your shell to your node installation directory, eg C:\Program Files (x86)\nodejs
  • run npm install npm (no -g option)
Hope it works!!
ThanK you!!
answered Jul 13, 2020 by Niroj
• 82,840 points

Related Questions In Node-js

0 votes
0 answers

How can I update NodeJS and NPM to their latest versions?

I just installed Node.js & NPM (Node Package Manager) I ...READ MORE

Aug 11, 2022 in Node-js by Neha
• 9,020 points
571 views
0 votes
1 answer

How do I update devDependencies in NPM?

Hello @kartik, To update package.json in addition to ...READ MORE

answered Jul 17, 2020 in Node-js by Niroj
• 82,840 points
7,614 views
0 votes
1 answer

How can i update multiple documents in mongoose?

Hello @kartik, Use: Device.updateMany({}, { cid: '' }); Hope it ...READ MORE

answered Oct 15, 2020 in Node-js by Niroj
• 82,840 points
3,859 views
0 votes
0 answers

How can I completely uninstall nodejs, npm and node in Ubuntu

I installed it using: sudo apt-get install ...READ MORE

May 15, 2022 in Node-js by Kichu
• 19,040 points
2,476 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,840 points
4,236 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,840 points
3,280 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,840 points
1,151 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,840 points
1,056 views
0 votes
1 answer

How can I set NODE_ENV=production on Windows?

Hello @kartik, It would be ideal if you ...READ MORE

answered Jul 13, 2020 in Node-js by Niroj
• 82,840 points
30,437 views
0 votes
1 answer

How can I get npm start at a different directory?

Hello @kartik, Try using: npm start --prefix path/to/your/app & inside ...READ MORE

answered Jul 14, 2020 in Node-js by Niroj
• 82,840 points
11,005 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