Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(docker): disable pnpm verify-deps-before-run in image builds (#14886)

Hassieb Pakzadf19c0f7ae13e
diff --git a/web/Dockerfile b/web/Dockerfile
index 525dfc8c22..772c886313 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -52,6 +52,13 @@ COPY --from=pruner /app/out/json/ .
RUN pnpm install --frozen-lockfile
+# pnpm 11 defaults verify-deps-before-run to "install", so every `pnpm run`
+# spawned by turbo re-checks node_modules via file mtimes. Cached install
+# layers make those mtimes look stale, and the concurrent auto-installs race
+# in the hoisting step (ENOENT unlink in node_modules/.pnpm/node_modules).
+# The frozen-lockfile install above is authoritative; skip the check.
+ENV pnpm_config_verify_deps_before_run=false
+
ENV DOCKER_BUILD 1
ENV NEXT_MANUAL_SIG_HANDLE true
diff --git a/worker/Dockerfile b/worker/Dockerfile
index 4f73de9aed..a8bd054d77 100644
--- a/worker/Dockerfile
+++ b/worker/Dockerfile
@@ -37,6 +37,13 @@ COPY --from=pruner /app/out/json/ .
RUN pnpm install --frozen-lockfile
+# pnpm 11 defaults verify-deps-before-run to "install", so every `pnpm run`
+# spawned by turbo re-checks node_modules via file mtimes. Cached install
+# layers make those mtimes look stale, and the concurrent auto-installs race
+# in the hoisting step (ENOENT unlink in node_modules/.pnpm/node_modules).
+# The frozen-lockfile install above is authoritative; skip the check.
+ENV pnpm_config_verify_deps_before_run=false
+
# pass public variables in build step
ARG NEXT_PUBLIC_LANGFUSE_CLOUD_REGION
ARG NEXT_PUBLIC_DEMO_ORG_ID