From 39fcd54f0c8c5db0c0024ba1049bd23f0f88d832 Mon Sep 17 00:00:00 2001 From: ginnoir Date: Wed, 6 May 2026 19:15:00 -0500 Subject: [PATCH] Fix migrate.mjs: externalize drizzle-orm and postgres from Next.js bundle Next.js bundles all non-externalized server packages into server chunks. drizzle-orm and postgres were bundled, so they were absent from the standalone node_modules/ and unavailable to migrate.mjs at startup. Adding them to serverExternalPackages keeps them as separate modules and tells the standalone tracer to include them. Co-Authored-By: Claude Sonnet 4.6 --- next.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index 1435e30..76f79b8 100644 --- a/next.config.ts +++ b/next.config.ts @@ -178,7 +178,7 @@ const nextConfig: NextConfig = { output: "standalone", // Keep pino and pino-pretty as native Node.js requires so their worker-thread // transport and stream internals work correctly inside the standalone bundle. - serverExternalPackages: ["pino", "pino-pretty"], + serverExternalPackages: ["pino", "pino-pretty", "drizzle-orm", "postgres"], }; export default nextConfig;