Prisma only supports Node.js versions 20.19+, 22.12+, 24.0+ Deploy Issue
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:

  1. Added NODE_VERSION=20 env variable → still uses 22.11.0
  2. Added NODE_VERSION=22.12.0 env variable → still uses 22.11.0
  3. Added engines field in package.json: "engines": { "node": ">=20.19.0" }
  4. 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

Welcome!

Sign in to your Railway account to join the conversation.

Loading...