From 09b0022b0227dd4190f8a902d00ef369e38479de Mon Sep 17 00:00:00 2001 From: "CTO (LegalAI)" Date: Thu, 9 Apr 2026 14:41:18 +0000 Subject: [PATCH] fix: include drizzle-orm and pg in serverExternalPackages for standalone migration The entrypoint.sh migration script (migrate.mjs) imports drizzle-orm/node-postgres/migrator which is never imported by app code. Next.js standalone trace therefore omits it from node_modules, causing the container to crash on startup before server.js runs. Adding drizzle-orm and pg to serverExternalPackages ensures the full packages are copied into the standalone output, fixing the migration crash. Co-Authored-By: Paperclip --- next.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index cea7850..1cdd52b 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,7 +2,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "standalone", - serverExternalPackages: ["pdf-parse"], + serverExternalPackages: ["pdf-parse", "drizzle-orm", "pg"], }; export default nextConfig;