From 5a5416bf2b17f4e01933c2cc4251e613808ad547 Mon Sep 17 00:00:00 2001 From: Priyanka Punukollu Date: Sun, 1 Mar 2026 00:15:16 -0600 Subject: [PATCH] Use Node 20 with engine override for Railway compatibility Made-with: Cursor --- .node-version | 2 +- .npmrc | 2 ++ nixpacks.toml | 15 +-------------- railway.toml | 2 +- 4 files changed, 5 insertions(+), 16 deletions(-) create mode 100644 .npmrc diff --git a/.node-version b/.node-version index 2bd5a0a98..209e3ef4b 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -22 +20 diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..b71e2abf3 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +engine-strict=false +legacy-peer-deps=true diff --git a/nixpacks.toml b/nixpacks.toml index 6a6eb2057..0c8c155c7 100644 --- a/nixpacks.toml +++ b/nixpacks.toml @@ -1,17 +1,4 @@ providers = ["node"] [variables] -NODE_VERSION = "22" -NPM_CONFIG_PRODUCTION = "false" - -[phases.setup] -nixPkgs = ["openssl"] - -[phases.install] -cmds = ["npm ci --legacy-peer-deps"] - -[phases.build] -cmds = ["npx prisma generate", "npm run build:production"] - -[start] -cmd = "npx prisma migrate deploy && npm run start" +NIXPACKS_NODE_VERSION = "20" diff --git a/railway.toml b/railway.toml index f04869a9b..459adf5c9 100644 --- a/railway.toml +++ b/railway.toml @@ -1,6 +1,6 @@ [build] builder = "nixpacks" -buildCommand = "npm ci && npx prisma generate && npm run build:production" +buildCommand = "npm ci --legacy-peer-deps && npx prisma generate && npm run build:production" [deploy] startCommand = "npx prisma migrate deploy && npm run start"