nineninesevenfour
nineninesevenfour

Reputation: 882

Is the upgrade of npm for node LTS recommended?

I have installed node LTS 14.17.2 via nodenv. npm now tells me a newer version is available:

New major version of npm available! 6.14.13 → 7.19.1

My question is: Is it recommended to upgrade npm or should I stay with the version shipped with node LTS?

Upvotes: 0

Views: 560

Answers (1)

Flet
Flet

Reputation: 479

The npm cli is packaged with the node.js install as a convenience, but it is maintained by a different team of folks and has its own release cadence, so it can be updated even without installing new version of Node.js.

Read up on the new features and breaking changes of npm 7 on Github's Blog post about npm 7 and think about how it may affect your programs. You can always try it and switch back to an older version if you run into problems.

Generally, I suggest checking out the changelog for npm and to understand what has been updated and use that to help you decide. If there is a new breaking change that requires a new version of node, it should be indicated in the changelog.

Upvotes: 1

Related Questions