Ask Your Question

Can I use the NPM command to update NPM (for NodeJS)?

asked 2018-04-30 09:20:22 -0500

David-LDA gravatar image

updated 2018-05-31 05:35:05 -0500

FranciscoD_ gravatar image

On Fedora 27 NPM comes installed with Node.

The latest version of NPM 6.0.0 has major new security auditing features, but the Fedora version is old.

NPM offers to update itself with:

npm install --global npm@6.0.0

Will this break something in Fedora? Maybe Fedora 28 will have NPM 6? (out tomorrow!) Thanks.

edit retag flag offensive close merge delete


Fedora 27 and 28 come with NodeJs 8.11.x - as far as I know it comes with npm 5.6.

florian gravatar imageflorian ( 2018-04-30 09:39:33 -0500 )edit
florian gravatar imageflorian ( 2018-04-30 10:19:25 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2018-05-02 04:43:06 -0500

David-LDA gravatar image


I think the actual best solution is that Fedora 28 comes with the new modular repo... and Node 10 just got added :)

Fingers crossed it comes with the latest NPM and all will be right in the world :)

edit flag offensive delete link more

answered 2018-05-01 06:14:48 -0500

heybuddy gravatar image

I recommend NVM to manage node versions. You never know when a project will require some specific version or other, and it's really handy to be able to check out the latest features in the new releases while still being able to rely on an LTS for projects that require it.

For example, to install the latest LTS node:

nvm install --lts

To set your default node to 6.1.0:

nvm alias default 6.1.0

To see all node versions available:

nvm ls-remote

It's pretty great!

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-04-30 09:20:22 -0500

Seen: 378 times

Last updated: May 02 '18