ReferenceError: File is not defined on Railway, not on local
attcs0HOBBY
a year ago
I get this error during runtime of my nuxt 3 application:
ReferenceError: File is not defined The error occurs since I've implemented FormData/File system on my webapp.
The error only occurs when deployed on Railway, not on my local dev server where I have node version 20+ installed.
Railway seems to run v 18.
https://github.com/vercel/next.js/discussions/56032According to this github thread, Node 20+ fixes this.
Does anyone know how to fix this or manually install a newer Node version on my railway instance?
1 Replies
a year ago
To use node 20 on Railway set your engines.node
to 20
in the package.json file.