I am using node version 11 and want to use 12.6. I had the package-lock.json file committed. When upgrading, should I remove my node module, npm install
, and commit the new package-lock.json
file?
Asked
Active
Viewed 1,199 times
1

raulInsto
- 85
- 11
2 Answers
1
No, node updates are backward compatible.

Ahmed Hammad
- 2,798
- 4
- 18
- 35
-
thanks. What about if other developers join team, won't that be an issue then since they'll have a differing package-lock.json when running `npm install` on node 12 than what was built and committed to the repo from node 11? – raulInsto May 08 '20 at 02:44
-
Still chuckling about this.. good one – Bysander Oct 28 '22 at 14:09
1
In package.json, there's a property called engine
to specify which versions of node.js that package can be used, when upgrading to new node version please check that.

trmaphi
- 901
- 1
- 9
- 16
-
I do have that in packages already: ``` "engines": { "node": "12.6.0", "npm": "6.9.0" }, – raulInsto May 08 '20 at 05:03