Upgrading a project to use a higher version of NodeJS?

Viewed 793

I have a project currently configured to run NodeJS v10.x.x, but I want to upgrade it to run on version 12.16.1 to be consistent with other projects I am working on and so that I do not have to use nvm dozens of times throughout the day.

My package.json contains:

{
  "engines": {
    "node": "10.x.x"
  },
  ...
}

If I change this to 12.x.x and build an error is thrown by a package in node_modules (the grpc package which I am not directly referencing in my package.json).

Question: I want to upgrade the packages in my package.json to the lowest versions required to be able to run Node v12.16.1, which hopefully will reduce the number of breaking changes caused by the upgrade. I want the minimal amount of changes possible.

Is there a good way to approach this? Other than updating one package to the latest version, trying to build, then repeating this process until it works.

0 Answers
Related