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 <noreply@paperclip.ing>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user