DEV Community

Discussion on: How to install npm AKA Node.js package manager the right way on openSUSE Linux

Collapse
 
tbroyer profile image
Thomas Broyer

…but then you have (correct me if I'm wrong) to manually update Node and NPM (which means you have to follow the news about it), rather than simply relying on your system updates (assuming Linux here)

And with npx you have even fewer steps: none. 😉

Thread Thread
 
archerallstars profile image
Archer Allstars • Edited

…but then you have (correct me if I'm wrong) to manually update Node and NPM (which means you have to follow the news about it), rather than simply relying on your system updates (assuming Linux here)

To update npm, all you need to do is npm update -g like you would do without nvm. nvm is simply a node version manager that lets you develop on a specific node version easily (and without needing the root permission).

To update node, it's nvm install node.

And for development purposes (debugging and so on), it's even better to update the system and node version separately.

And with npx you have even fewer steps: none. 😉

I believe npm and npx have difference use cases.