DEV Community

Jon Friesen
Jon Friesen

Posted on • Originally published at jonfriesen.ca on

App Platform: How to set specific NodeJS version?

NodeJS projects have an optional configuration in their package.json for indicating the supported engine(s) for an app. This can look like:

{ 
  "engines" : { 
    "node" : "12.19.0" 
  }
}

Enter fullscreen mode Exit fullscreen mode

ranges are also supported, for example:

{ 
  "engines" : { 
    "node" : ">=12.0.0 <=14.0.0" 
  }
}

Enter fullscreen mode Exit fullscreen mode

this range says an app can be run on NodeJS 12 to 14 (inclusively).

Click here for more info on NoedJS engines.

Top comments (0)