From bb85a0c32473fd14c7e66aca76cdc6161a12580c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20X=2E=20F=C3=BCrst?= Date: Sun, 12 Jul 2026 21:47:40 +0200 Subject: [PATCH] Fix: next.config.ts -> next.config.js (Prod-Image hat kein TypeScript) Das runner-Stage uebernimmt node_modules aus dem deps-Stage (npm ci --omit=dev), enthaelt also kein TypeScript. Next.js konnte die next.config.ts deshalb zur Laufzeit nicht transpilieren und brach beim Start ab ("Failed to transpile next.config.ts"). Die Config setzt nur turbopack.root, was fuer `next start` ohnehin irrelevant ist - daher gleichwertig als CommonJS-JS-Datei. Co-Authored-By: Claude Opus 4.8 (1M context) --- Dockerfile | 2 +- next.config.js | 10 ++++++++++ next.config.ts | 10 ---------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 next.config.js delete mode 100644 next.config.ts diff --git a/Dockerfile b/Dockerfile index 3b9b8cb..0fd0314 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,6 @@ COPY --from=deps /app/node_modules ./node_modules COPY --from=builder /app/.next ./.next COPY --from=builder /app/public ./public COPY --from=builder /app/package.json ./package.json -COPY --from=builder /app/next.config.ts ./next.config.ts +COPY --from=builder /app/next.config.js ./next.config.js EXPOSE 3000 CMD ["npm", "start"] diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..34ea03a --- /dev/null +++ b/next.config.js @@ -0,0 +1,10 @@ +const path = require("path"); + +/** @type {import('next').NextConfig} */ +const nextConfig = { + turbopack: { + root: path.resolve(__dirname), + }, +}; + +module.exports = nextConfig; diff --git a/next.config.ts b/next.config.ts deleted file mode 100644 index b060a82..0000000 --- a/next.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { NextConfig } from "next"; -import path from "path"; - -const nextConfig: NextConfig = { - turbopack: { - root: path.resolve(__dirname), - }, -}; - -export default nextConfig;