You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate the esbuild build approval from the deprecated onlyBuiltDependencies setting to pnpm v11's allowBuilds configuration.
Include pnpm-lock.yaml and pnpm-workspace.yaml in the Docker build context and image stages.
Keep pnpm@latest instead of pinning the Docker build to an older pnpm release.
Root cause
A clean docker compose build currently fails in two stages:
.dockerignore excludes pnpm-lock.yaml, even though the Dockerfile copies it.
Once the lockfile is available, pnpm v11 rejects the unapproved esbuild@0.27.7 postinstall script with ERR_PNPM_IGNORED_BUILDS.
The existing .npmrc uses onlyBuiltDependencies, which is deprecated in pnpm v11. This change replaces it with the supported project-level configuration:
allowBuilds:
esbuild: true
Changes
Stop excluding pnpm-lock.yaml from the Docker build context.
Replace .npmrc with pnpm-workspace.yaml and explicitly allow the esbuild build script.
Copy pnpm-workspace.yaml into both Docker stages before dependency installation.
Validation
docker compose build --no-cache
pnpm 11.13.1
esbuild postinstall completed successfully
both HTTP and stdio images built successfully
docker compose up -d
both services started and reported healthy
pnpm test: 25 tests passed
pnpm run type-check: passed
git diff --check: passed
pnpm run lint: reports an existing formatting error in src/server.test.ts and an existing warning in src/utils/responseFormatter.ts; neither file is changed by this PR
Thanks for the PR, @timelis — you correctly identified both problems breaking the Docker build from a fresh clone (the lockfile being excluded by .dockerignore and pnpm 10+ blocking esbuild's build script).
Closing this one because the build issue was resolved by merging #60, which took a slightly different approach: pinning pnpm@10.33.0 in the Dockerfile and copying the existing .npmrc (which already carries the esbuild build approval) into the image. That keeps the build reproducible without changing the repo's package-manager config.
The pnpm 11-style migration you propose here (pnpm-workspace.yaml with allowBuilds, dropping .npmrc) is a reasonable direction, but we'd rather do it as part of an intentional pnpm 11 upgrade for the whole project than as a side effect of the Docker fix. We'll keep it in mind for when that happens.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
onlyBuiltDependenciessetting to pnpm v11'sallowBuildsconfiguration.pnpm-lock.yamlandpnpm-workspace.yamlin the Docker build context and image stages.pnpm@latestinstead of pinning the Docker build to an older pnpm release.Root cause
A clean
docker compose buildcurrently fails in two stages:.dockerignoreexcludespnpm-lock.yaml, even though the Dockerfile copies it.esbuild@0.27.7postinstall script withERR_PNPM_IGNORED_BUILDS.The existing
.npmrcusesonlyBuiltDependencies, which is deprecated in pnpm v11. This change replaces it with the supported project-level configuration:Changes
pnpm-lock.yamlfrom the Docker build context..npmrcwithpnpm-workspace.yamland explicitly allow the esbuild build script.pnpm-workspace.yamlinto both Docker stages before dependency installation.Validation
docker compose build --no-cache11.13.1docker compose up -dpnpm test: 25 tests passedpnpm run type-check: passedgit diff --check: passedpnpm run lint: reports an existing formatting error insrc/server.test.tsand an existing warning insrc/utils/responseFormatter.ts; neither file is changed by this PRCloses #59
Alternative to #60: this fixes the same Docker build failure by migrating the project configuration to pnpm v11 instead of pinning pnpm to v10.
Related core workflow workaround: Dokploy/dokploy#4839