From 2059f04900e38882590f2bf0c3bc71a13dfe10e8 Mon Sep 17 00:00:00 2001 From: Ntege Daniel Date: Tue, 6 Oct 2026 10:44:08 +0300 Subject: [PATCH] fix nixpacks config for coolify deployment Drop the invalid "pnpm" provider, pin Node 22 (the nixpkgs snapshot used by Nixpacks has no Node 24) and start the Next.js server via `pnpm start` instead of a non-existent .next/server/server.js. Signed-off-by: Ntege Daniel --- nixpacks.toml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/nixpacks.toml b/nixpacks.toml index 14840fc8..6126d322 100644 --- a/nixpacks.toml +++ b/nixpacks.toml @@ -1,16 +1,15 @@ -providers = ["...", "node", "pnpm"] - +# Coolify build (Nixpacks). Node 22 is pinned explicitly; the nixpkgs snapshot +# Nixpacks uses has no Node 24. `pnpm` there is 10.x, which self-switches to the +# version in package.json#packageManager, so that field is the single pnpm pin. [phases.setup] -nixPkgs = ["...", "nodejs_24"] +nixPkgs = ["nodejs_22", "pnpm"] [phases.install] -cmds = [ - "corepack enable", - "pnpm install --frozen-lockfile" -] +cmds = ["pnpm install --frozen-lockfile"] [phases.build] cmds = ["pnpm run build"] +# Runs `next start` (SSR, middleware, API routes) on $PORT, which Coolify injects. [start] -cmd = "node .next/server/server.js" +cmd = "pnpm start"