From 8842414d8a1594034db4e3bbceb93f81903f37ee Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Date: Wed, 17 Jun 2026 04:46:25 -0300 Subject: [PATCH] fix(docker): build release image with webpack (Turbopack internal panic) (#4052) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v3.8.27 release Docker build failed on BOTH linux/amd64 and linux/arm64 with a non-recoverable Turbopack panic — `TurbopackInternalError: internal error: entered unreachable code: there must be a path to a root` in `ImportTracer::get_traces` (during issue reporting), at Dockerfile `RUN npm run build`. Deterministic (not transient), so a re-run does not help. The webpack build is the proven engine — `build:release` (deployed to the VPS), the CI `Build` job, and `npm run build:cli` all use it and are green. Switch the Docker build to webpack (OMNIROUTE_USE_TURBOPACK=0); re-enable once the upstream Turbopack tracer bug is fixed. Documented in QUALITY_GATE_PLAYBOOK Parte 6. --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6056be468b..cc82a141dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,8 +38,13 @@ RUN --mount=type=cache,target=/root/.npm \ && npm rebuild better-sqlite3 \ && node -e "require('better-sqlite3')(':memory:').close()" -# Use Turbopack for significant build speedup -ENV OMNIROUTE_USE_TURBOPACK=1 +# Build with webpack (stable). Turbopack hit a non-recoverable internal panic on this +# Next.js version during the v3.8.27 release build — TurbopackInternalError "entered +# unreachable code: there must be a path to a root" in ImportTracer::get_traces, on both +# linux/amd64 and linux/arm64. Webpack is the proven engine (build:release / VPS / CI Build +# all green). Re-enable Turbopack (=1) once the upstream tracer bug is fixed. +# See docs/ops/QUALITY_GATE_PLAYBOOK.md Parte 6. +ENV OMNIROUTE_USE_TURBOPACK=0 COPY . ./ RUN --mount=type=cache,target=/app/.build/next/cache \