How can I update NodeJS and NPM to the next versions?

0 votes
I just installed Node.js and npm (for additional modules).

How can I update Node.js and the modules which I'm using to the latest versions?

Can npm do it, or do I have to remove and reinstall Node.js and npm to get the next versions?
May 5 in Java-Script by kartik
• 27,140 points
76 views

1 answer to this question.

0 votes

Hello @kartik,

First check your NPM version

npm -v

1).Update NPM to current version:

View curent NPM version:

npm view npm version

Update npm to current version:

npm i -g npm

2). List all available NPM versions and make a custom install/update/roll-back

View all versions including "alpha", "beta" and "rc" (release candidate)

npm view npm versions --json

Reinstall NPM to a specific version chosen from the versions list - for example to 5.0.3

npm i -g npm@5.0.3

Hope this works!!

Thank You!!

answered May 5 by Niroj
• 58,500 points

Related Questions In Java-Script

0 votes
2 answers

How can I set a session var using javascript and get it via php code?

Yes it is possible. You can either ...READ MORE

answered Aug 9 in Java-Script by Okugbe
• 280 points
1,231 views
0 votes
1 answer

How can I allow django admin to set a field to NULL?

Hello @kartik, Try to overwrite the save() method ...READ MORE

answered Jun 12 in Java-Script by Niroj
• 58,500 points
230 views
0 votes
1 answer

How can I change the page URL without refreshing the page?

Hello @kartik, This is simple you just need change ...READ MORE

answered Jun 18 in Java-Script by Niroj
• 58,500 points
168 views
0 votes
1 answer

How do I pass variables and data from PHP to JavaScript?

Hello @kartik, Simply use one of the following ...READ MORE

answered Jul 6 in Java-Script by Niroj
• 58,500 points
82 views
0 votes
1 answer

How can we Create Multiple Where Clause Query Using Laravel Eloquent?

Hii, You can use Conditions using Array: $users = User::where([ ...READ MORE

answered Mar 30 in Laravel by Niroj
• 58,500 points
2,314 views
0 votes
1 answer

How to send email using php?

Hello @kartik 1.) Download PHPMailer, open the zip file ...READ MORE

answered Apr 1 in PHP by Niroj
• 58,500 points
80 views
0 votes
1 answer

Where to register Facades & Service Providers in Lumen?

Hello, To register a facade with an alias, ...READ MORE

answered Apr 6 in Laravel by Niroj
• 58,500 points
411 views
0 votes
1 answer

Switch statement for string matching in JavaScript

Hello @kartik, Just use the location.host property switch (location.host) ...READ MORE

answered Jun 2 in Java-Script by Niroj
• 58,500 points
64 views
0 votes
1 answer

How can I make a div stick to the top of the screen once it's been scrolled to?

Hello @kartik, Using javascript: var initTopPosition= $('#myElementToStick').offset().top; ...READ MORE

answered Sep 4 in Java-Script by Niroj
• 58,500 points
22 views
0 votes
1 answer

How can I send a message to a particular client with socket.io?

Hii, You can try the code below: io.to(socket.id).emit("event", data); whenever ...READ MORE

answered Apr 27 in Java-Script by Niroj
• 58,500 points
3,114 views