From e8bdd7d7fcfa1ec71d3ecdecbe31bf68427128b2 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 19 Mar 2026 08:56:45 +0700 Subject: [PATCH] 260319:0856 Fix UUID #18 --- .npmrc | 2 ++ backend/Dockerfile | 3 ++- frontend/Dockerfile | 4 ++-- frontend/next.config.mjs | 9 ++++----- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.npmrc b/.npmrc index 9f89da2..4244a9f 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,5 @@ shamefully-hoist=true public-hoist-pattern[]=*typeorm* public-hoist-pattern[]=*ts-node* +# Reduce bin creation warnings +prefer-workspace-packages=true diff --git a/backend/Dockerfile b/backend/Dockerfile index 508bc85..8ca8f2a 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -49,7 +49,8 @@ RUN cd backend && \ pnpm run build # Deploy with production deps only (pnpm workspace isolation) -RUN pnpm --filter backend deploy --prod --shamefully-hoist --legacy /app/backend-prod +RUN PNPM_IGNORE_SCRIPTS=none \ + pnpm --filter backend deploy --prod --shamefully-hoist --legacy --no-optional /app/backend-prod # Clean up unnecessary files to reduce size RUN find /app/backend-prod/node_modules -name "*.md" -delete \ diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 758d31c..7464589 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -48,8 +48,8 @@ ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL} ENV NODE_OPTIONS="--max-old-space-size=2048" ENV NEXT_TELEMETRY_DISABLED=1 -# Build Next.js → frontend/.next/standalone -RUN cd frontend && pnpm run build +# Build Next.js → frontend/.next/standalone (use webpack to avoid Turbopack issues) +RUN cd frontend && pnpm run build --webpack # ========================= diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index 4e3d8de..3737c16 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -36,13 +36,12 @@ const nextConfig = { }, */ - // 5. Experimental: Handle client component static generation issues - experimental: { - // Disable static optimization for client components that cause build failures - missingSuspenseWithCSRBailout: false, + // 5. Turbopack config for Next.js 16 + turbopack: { + // Empty config to silence Turbopack warnings }, - // 5.1. Webpack config to suppress warnings + // 5.1. Webpack config (fallback for Turbopack) webpack: (config, { dev, isServer }) => { if (!dev && !isServer) { config.stats = {