Node v18 is currently not supported by Ubuntu 18.04. Please refer to this issue for more details.
If your app was built using Node v18, consider running your application through Docker or Docker Compose.Listed below is the repository for an example Gatsby JS app that was installed with Node v18.12.1. Gatsby JS currently requires Node v18 or higher to work.
Once you’ve added the Dockerfile, add the following Layerfile to the base of the project:
Layerfile
Copy
FROM vm/ubuntu:18.04# Install the latest version of Docker, as in the official Docker installation tutorial.RUN apt-get update && \ apt-get install ca-certificates curl gnupg lsb-release && \ sudo mkdir -p /etc/apt/keyrings && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |\ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \ apt-get update && \ apt-get install docker-ce docker-ce-cli containerd.ioCOPY . .RUN docker build -t image .RUN BACKGROUND docker run -d -p 80:3000 imageEXPOSE WEBSITE http://localhost:80
The last step is to push your code to your repository. If you’ve connected your repository to webapp.io, webapp.io will listen for the new commit and run the instructions in the Layerfile.