From 0f8de6479d798c29bbbe8a8a80a9fe1b056ce4d9 Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Mon, 23 Feb 2026 21:55:04 +0000 Subject: [PATCH] fix: drop --no-require-module from migrator (added in Node 22.12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exit code 9 from Node.js means "Invalid argument", not SIGKILL/OOM. --no-require-module was added in Node 22.12.0 — the cached node:22-slim image on the VPS predates that release so Node rejects the flag immediately. The minimal migrate.ts doesn't load lexical/form-builder, so there are no TLA/ESM issues that required the flag in the first place. Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1191d20..517e45d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,11 @@ CMD ["pnpm", "dev"] FROM base AS migrator COPY --from=deps /app/node_modules ./node_modules COPY . . -# Same Node.js native TS-stripping approach used by seed.ts (avoids TLA issues with lexical) -ENV NODE_OPTIONS="--experimental-strip-types --no-require-module" +# --experimental-strip-types: run migrate.ts + migration files as TypeScript natively. +# --no-require-module is intentionally omitted: it was added in Node 22.12.0 and the +# cached base image may be older; our minimal migrate script doesn't load lexical so +# there are no TLA/ESM issues that required that flag. +ENV NODE_OPTIONS="--experimental-strip-types" CMD ["node", "src/scripts/migrate.ts"] # --- Build ---