I'm trying to build a cloud application on Deta Space (https://deta.space/) and I'm having some trouble with the Node version. I want to use Node18, which works fine on my local machine ($ space dev
), but when I upload it to the cloud ($ space push
) it gives me an error during building process, saying Micro uses Node16 and minumum Node18 is required.
My application has two Micros: one for the frontend (GatsbyJS V5), where is the issue, and one for the backend (Python). This is my Spacefile:
# Spacefile Docs: https://go.deta.dev/docs/spacefile/v0
v: 0
micros:
- name: frontend
src: ./frontend/
engine: static
primary: true
commands:
- npm run build
serve: public
dev: npm run develop
- name: backend
src: ./backend/
engine: python3.9
dev: uvicorn main:app --reload
run: uvicorn main:app
path: api
primary: false
Is there a way to specify the Node version for the frontend micro? Or do I have to use Node16?.
I'd like to know whether I can specify or install a new Node version in the Micros.
Any help would be appreciated. Thanks!
Space only supports Node.js 16 based on their documentation. You'll need to use v16 locally for now.