Support Node.js 18 in App Platform
M
Max Carlson
I have node 20 (LTE) version working via an .nvmrc file in my root containing the single line:
v20.12.0
Bora ALAP
My app is running Ubuntu 22 but it is still installing node 16.20. Not sure what am I missing here.
Bobby Iliev
Bora ALAP: You probably have the Node.js version specified in your
package.json
file, you need to change that and then run npm update
and push the changes to your GitHub Project. For more information you can check out the docs here: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/#ubuntu-2204-stack-supporting-nodejs-18Greg
For anyone interested: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/#ubuntu-2204-stack-supporting-nodejs-18
I'm using this successfully in a bunch of customer apps now.
A
Andrés Castillo
Greg: this works great. just create a file called deploy-template.yaml inside folder .do < create this folder on root of project. and this is the .yaml file: https://gist.github.com/aazcast/0e98e154483fa0c9657dc879396adb1b
A
Andrés Castillo
Boris Barzotto, Lasse Viggo Albert Ciepliński
Albert Ciepliński
Andrés Castillo: thanks! I'll give it a spin
Greg
It's now official: https://docs.digitalocean.com/release-notes/app-platform/
Lasse Viggo
Greg: How do you keep yourself informed on these releases?
Greg
Lasse Viggo: I have saved this link and check it monthly.
q
quereame
I tried the creation of
.do/app.yaml
and .do/deploy-template.yaml
as suggested but didn't work for me.I only get success when I used the DigitalOcean CLI tool, following this post https://medium.com/@viniciu_/updating-your-app-to-node-18-on-digitalocean-app-platform-2d4c3eee524c
Boris Barzotto
I am going to have to change my app to another service and I really like DO, many dependencies already ask for node 18, I can hold on a little bit if I get some feedback that it will be updated in the short term, but if it is not in the future plans I would like to know to migrate to another platform, thanks
Lasse Viggo
Asked support to for an ETA on this issue, seems like they have it marked for end of August 2023.
A
Andrés Castillo
it looks like DO abandoned the project, any answer about this issues. is time to search for other providers.
Albert Ciepliński
Please. Make.
A
Andrés Castillo
July 27, 2023 and still is not resolved. What to expect from DO. right now everyone updating to node 20, and we can't move forward from node 16. Horrible.
S
Sven van Reenen
Common, the world is on node 20 and we are on 16.... this has to be a top priority
S
Simon Dragsbæk
For anyone seeing this - while your waiting you can configure your setup using this Dockerfile
I have added a docker-compose for you to "fake" the setup digitalocean to test that your file runs instead of having to push to digitalocean to test
Note if you have a build step you need to add that in your Dockerfile to your app-spec.yml like shown in the comment - app spec is found by clicking the app->settings->app spec tab (edit button) and then editing the yml in there
Caveat: My build times went from ~1min to ~1.5min but i guess its an okay trade for v20 node
You can also edit the node version by just swapping node:20 to fx node:18 see https://hub.docker.com/_/node/ for node docker images
BTW i'm not a DO employee - just a dev that had the same problem as you
Load More
→