Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Update NPM? (Node Package Manager) LINUX

#1
How to Update NPM? (Node Package Manager)

If you want to update the NPM, it means you are updating the package manager, Node.js, and modules to the latest version.

Code:
npm update [-g] [<pkg>...]
Where g stands for global and pkg stands for the package.

1. Using Update Command
You can use the npm update command for updating the node package manager.
Code:
npm update -g


2. Using npm@latest Command
You can use the npm@latest command for updating the node package manager. This command will also work for the Linux system.
Code:
npm install npm@latest -g


3. Using npm@next Command
You can use the npm@next command for updating the node package manager. This command will also work for the Linux system.
Code:
npm install -g npm@next



How to update NPM package on Linux?


1. Using PPA repository
You can run any of the below commands for updating the node package manager on the Linux system.
Code:
sudo add-apt-repository ppa:chris-lea/node.js
Code:
sudo apt-get update
Code:
sudo apt-get install nodejs npm


2. Using Cache Cleaning and Installing Stable NPM Version
Run all the following commands step-by-step to install the stable release.

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

[Image: 609a75a4f1abf-sudo-n-stable.png]


Want to know how to update NPM for windows?

Here ya go: https://www.sickgaming.net/thread-99261.html

Hope I helped someone!
[Image: RvghcKs.png]
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

[-]
Discord

[-]
Active Threads
Steam - Team Fortress 2 Update Released
Last Post: GilbertBib
Today 08:34 AM
» Replies: 1
» Views: 128
[Tut] Pandas cut() – A Simple Guide with...
Last Post: xSicKxBot
Yesterday 10:59 PM
» Replies: 0
» Views: 28
(Indie Deal) Grab Die Young for FREE & c...
Last Post: xSicKxBot
Yesterday 10:59 PM
» Replies: 0
» Views: 4
Blender 3 Released
Last Post: xSicKxBot
Yesterday 10:59 PM
» Replies: 0
» Views: 4
AppleInsider - Apple execs explain the d...
Last Post: xSicKxBot
Yesterday 10:58 PM
» Replies: 0
» Views: 3
Microsoft - ID@Xbox Winter Game Fest Dem...
Last Post: xSicKxBot
Yesterday 10:58 PM
» Replies: 0
» Views: 4
News - Talking Point: What Can This $120...
Last Post: xSicKxBot
Yesterday 10:58 PM
» Replies: 0
» Views: 5
Xbox Wire - Get Ready for the Alien Inva...
Last Post: xSicKxBot
Yesterday 10:58 PM
» Replies: 0
» Views: 5
News - Tsareena brings grass-fuelled glo...
Last Post: xSicKxBot
Yesterday 10:58 PM
» Replies: 0
» Views: 4
[Tut] User Registration in PHP with Logi...
Last Post: GilbertBib
Yesterday 01:45 PM
» Replies: 1
» Views: 53

[-]
Twitter

[-]
Sponsored
Get the Deal of the Week at RefurBees.com



Discord Server © SickGaming.net 2012-2021