Anonymous
FREEOP
4 months ago
Hello!
I'm having trouble deploying my Next.js app because Prisma 7.3.0 requires Node.js ^20.19
|| ^22.12 || >=24.0, but Railway is using v22.11.0.
Error:
npm error │ Prisma only supports Node.js versions 20.19+, 22.12+, 24.0+. │
npm error │ Please upgrade your Node.js version. │
current: { node: 'v22.11.0', npm: '10.9.0' }
What I've tried:
- Added NODE_VERSION=20 env variable → still uses 22.11.0
- Added NODE_VERSION=22.12.0 env variable → still uses 22.11.0
- Added engines field in package.json: "engines": { "node": ">=20.19.0" }
- Created nixpacks.toml: [phases.setup] nixPkgs = ["nodejs_22"]
[variables]
NODE_VERSION = "22"
5. Created .node-version file with 22.12.0
None of these approaches changed the Node.js version used during build.
Question: How can I force Railway to use Node.js 22.12+ or 20.19+ to meet Prisma's
requirements?
Thanks in advance! 🙏
ProjectID: f4ffaf00-bf8e-4fc7-8e95-9d64d9995b8d
0 Replies