From beb050aee27b1c5e1924da0be1d945d519ed3c33 Mon Sep 17 00:00:00 2001 From: hamed <15238-genius.ha@users.noreply.drupalcode.org> Date: Mon, 6 Jul 2026 11:31:46 +0330 Subject: [PATCH] fix(docker): force devDependencies in deps stage (--include=dev) Coolify injects NODE_ENV=production / npm omit=dev at build time, which made 'npm ci' skip devDependencies. babel-plugin-react-compiler is a devDependency and Next 16's reactCompiler:true requires resolving it, so the build failed with: Failed to resolve package babel-plugin-react-compiler ... React compiler is enabled in next.config.js. Reproduced locally with npm_config_omit=dev (react-compiler MISSING with plain npm ci, PRESENT with --include=dev). --include=dev overrides the platform's omit config so all build-time devDeps are installed. Co-Authored-By: Claude Fable 5 --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b687f39..1de625b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,10 @@ FROM base AS deps COPY package.json package-lock.json .npmrc ./ # Reproducible install honouring the lockfile (.npmrc provides legacy-peer-deps, # required because react-google-map-picker declares a React 17 peer). -RUN npm ci --no-audit --no-fund +# --include=dev forces devDependencies even when the platform injects +# NODE_ENV=production (Coolify does this on all stages); the build needs +# devDeps such as babel-plugin-react-compiler (React Compiler) and typescript. +RUN npm ci --include=dev --no-audit --no-fund # ---------------------------------------------------------------------------- # 2. Builder — produces the standalone output.