Skip to content

fix: migrate esbuild build approval to pnpm 11 - #62

Open
timelis wants to merge 1 commit into
Dokploy:mainfrom
timelis:codex/bugfix-pnpm-allow-builds
Open

fix: migrate esbuild build approval to pnpm 11#62
timelis wants to merge 1 commit into
Dokploy:mainfrom
timelis:codex/bugfix-pnpm-allow-builds

Conversation

@timelis

@timelis timelis commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • 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:

  1. .dockerignore excludes pnpm-lock.yaml, even though the Dockerfile copies it.
  2. 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

Closes #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

@timelis
timelis marked this pull request as ready for review July 16, 2026 16:08
@timelis
timelis marked this pull request as draft July 16, 2026 16:11
@timelis
timelis marked this pull request as ready for review July 16, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker compose build fails: lockfile excluded and pnpm latest breaks install

1 participant