Question

DigitalOcean App Node.js Version less than 15

I am trying to deploy a Node.js app but getting errors that the node version is not supported by dependencies (they support node 12-14 and the server appears to be running node 15). Is there any way other than using a custom docker container deploy to specify the node version? I don’t see any way to do it in the app.yaml file or any documentation as to the environment_slug to use for different node versions.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Jon Friesen
DigitalOcean Employee
DigitalOcean Employee badge
October 21, 2020
Accepted Answer

👋 @bherbruck

This is configurable in your package.json file use the engines property. More info here

Here is an example of the engines property for the current Node LTS version:

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

Here is another example of the engines property that span between inclusive Node versions v12 to v14:

{ 
  "engines" : { 
    "node" : ">=12.0.0 <=14.0.0" 
  }
}
Bobby Iliev
Site Moderator
Site Moderator badge
June 2, 2024

Hi there,

Quick update here in case anyone comes across this in the future.

DigitalOcean has now improved functionality with managing NodeJS runtime support from 6.x - 21.x.

You can check out the official documentation page for more information here:

https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/#current-buildpack-version-and-supported-runtimes

- Bobby

FYI; Node 16 is available through apps now

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel