Skip to content

fix / pnpm v11 compatibility issues#634

Merged
rapcmia merged 5 commits into
developmentfrom
fix/pnpm-v11-compatibility
May 15, 2026
Merged

fix / pnpm v11 compatibility issues#634
rapcmia merged 5 commits into
developmentfrom
fix/pnpm-v11-compatibility

Conversation

@fengtality
Copy link
Copy Markdown
Contributor

@fengtality fengtality commented May 11, 2026

Summary

Details

Issue #632 - Docker CI build fails

pnpm v11 requires Node.js >= 22.13, but the Docker image uses Node 20. The Dockerfile was using pnpm@latest which now resolves to v11. Fixed by pinning to pnpm@10.

Issue #633 - pnpm install fails with ERR_PNPM_EXOTIC_SUBDEP

pnpm v11 blocks "exotic subdependencies" (git-hosted packages in transitive dependencies) by default. The dependency chain:

@solflare-wallet/utl-sdk → @metaplex-foundation/js → @bundlr-network/client → arbundles → avsc (git tarball)

Fixed by adding pnpm-workspace.yaml with blockExoticSubdeps: false.

Test plan

  • Docker build succeeds with Node 20 base image
  • pnpm install works with pnpm v11.x (requires Node 22+)
  • pnpm install works with pnpm v10.x (Node 20+)

References

🤖 Generated with Claude Code

- Pin Dockerfile to pnpm@10 for Node 20 compatibility (fixes #632)
  pnpm v11+ requires Node.js >= 22.13
- Add pnpm-workspace.yaml with blockExoticSubdeps: false (fixes #633)
  Allows exotic subdependencies (git-hosted packages) in dependency tree

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fengtality fengtality added this to the v2.15 milestone May 11, 2026
@rapcmia
Copy link
Copy Markdown
Contributor

rapcmia commented May 12, 2026

  • Test pnpm install using v11.x
    • use pnpm 11.1.0 ❌
      image
    • use pnpm 11.0.9 ❌
      image
    • Observed that the pnpm-workspace.yaml not assigned to any of true or false for the allow builds automatically
      #### cat pnpm-workspace.yaml   
                                                                                                                                               [0/1]
      allowBuilds:
        bigint-buffer: set this to true or false
        bufferutil: set this to true or false
        classic-level: set this to true or false
        dtrace-provider: set this to true or false
        esbuild: set this to true or false
        keccak: set this to true or false
        node-hid: set this to true or false
        secp256k1: set this to true or false
        unrs-resolver: set this to true or false
        usb: set this to true or false
        utf-8-validate: set this to true or false
      # pnpm workspace configuration
      # https://pnpm.io/pnpm-workspace_yaml
      
      # Disable blocking of exotic subdependencies (required for pnpm v11+)
      # The dependency chain @solflare-wallet/utl-sdk -> @metaplex-foundation/js ->
      # @bundlr-network/client -> arbundles -> avsc uses a git-hosted tarball
      # See: https://github.com/hummingbot/gateway/issues/633
      blockExoticSubdeps: false
      
      • The current fix addresses ERR_PNPM_EXOTIC_SUBDEP by setting blockExoticSubdeps: false, but pnpm install can still fail on pnpm v11.x because of ERR_PNPM_IGNORED_BUILDS.
      • The pnpm-workspace.yaml is not fully updated just by adding the file, the allowBuilds section still needs real boolean values (true / false) for the affected packages.
      • I set all allowBuilds to true and able to run pnpm install
        #### cat pnpm-workspace.yaml
        allowBuilds:
          bigint-buffer: true
          bufferutil: true
          classic-level: true
          dtrace-provider: true
          esbuild: true
          keccak: true
          node-hid: true
          secp256k1: true
          unrs-resolver: true
          usb: true
          utf-8-validate: true
        # pnpm workspace configuration
        # https://pnpm.io/pnpm-workspace_yaml
        
        # Disable blocking of exotic subdependencies (required for pnpm v11+)
        # The dependency chain @solflare-wallet/utl-sdk -> @metaplex-foundation/js ->
        # @bundlr-network/client -> arbundles -> avsc uses a git-hosted tarball
        # See: https://github.com/hummingbot/gateway/issues/633
        blockExoticSubdeps: false
        
        image image

Build docker image ✅

image
  • Clone fresh PR634 and build docker image ok

@rapcmia rapcmia changed the title fix: pnpm v11 compatibility issues fix / pnpm v11 compatibility issues May 12, 2026
@rapcmia rapcmia moved this to Backlog in Pull Request Board May 12, 2026
@rapcmia rapcmia moved this from Backlog to Under Review in Pull Request Board May 12, 2026
pnpm v11 blocks postinstall build scripts for native modules by default
unless they are listed in allowBuilds with a boolean value. blockExoticSubdeps
alone was not enough — pnpm install still failed with ERR_PNPM_IGNORED_BUILDS.

Allow the native modules the gateway actually needs (bigint-buffer, secp256k1,
keccak, etc.) so pnpm install completes on v11.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fengtality
Copy link
Copy Markdown
Contributor Author

@rapcmia good catch — pushed e6675bf80 which adds the allowBuilds section with explicit boolean values for the 11 native modules. Matches the working config from your test (bigint-buffer, bufferutil, classic-level, dtrace-provider, esbuild, keccak, node-hid, secp256k1, unrs-resolver, usb, utf-8-validate all set to true).

Mind re-running pnpm install against pnpm v11.x once more to confirm ERR_PNPM_IGNORED_BUILDS is gone now?

@fengtality
Copy link
Copy Markdown
Contributor Author

Tested locally — confirmed both directions:

Without allowBuilds (reverted to just blockExoticSubdeps: false):

[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: bigint-buffer@1.1.5, bufferutil@4.0.9,
classic-level@1.4.1, dtrace-provider@0.8.8, esbuild@0.25.5, keccak@3.0.4, node-hid@2.1.2,
secp256k1@4.0.4, unrs-resolver@1.9.2, usb@2.9.0, utf-8-validate@5.0.10

(pnpm v11.1.2, Node 24)

With the allowBuilds fix in e6675bf80:

Done in 4.4s using pnpm v11.1.2

Build scripts ran for the native modules (e.g. keccak produced Release/addon.node, dtrace-provider compiled via gyp), and bigint-buffer loads/runs at runtime.

Dockerfile path (pnpm@10 install --frozen-lockfile) also still works: Done in 6s using pnpm v10.33.4.

Node 20 reached end of life in April 2026, so the production Docker image was
running on an unsupported runtime. Bump to Node 22 LTS (supported through
April 2027) and update engines.node to match.

With Node 22 in place, the pnpm@10 pin (added for Node 20 compatibility) is no
longer needed — switch to pnpm@11 and make `pnpm install --frozen-lockfile`
actually work on v11 by:

- Migrating `resolutions` from package.json to `overrides:` in
  pnpm-workspace.yaml (yarn-style `resolutions` is not respected by pnpm v11,
  which caused ERR_PNPM_LOCKFILE_CONFIG_MISMATCH).
- Copying pnpm-workspace.yaml into the Docker image alongside package.json
  and pnpm-lock.yaml so the overrides + allowBuilds config is present at
  install time.
- Adding node_modules / dist / coverage / .git to .dockerignore so the build
  context is not 1GB of macOS-built artifacts that pnpm v11 then tries to
  purge non-interactively.

Verified: `docker build` succeeds end-to-end, container runs on Node 22.22.3,
bigint-buffer loads in the container, `pnpm v11 install --frozen-lockfile`
finishes in ~150ms with no errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fengtality
Copy link
Copy Markdown
Contributor Author

Pushed 531a295d2 — given Node 20 hit EOL in April 2026, expanded the PR scope to land the runtime bump alongside the pnpm fix rather than leaving the Docker image on unsupported Node.

Changes in this commit:

  • Dockerfile: node:20-bookworm-slimnode:22-bookworm-slim (LTS through April 2027), pnpm@10pnpm@11 (no longer pinned for Node 20 compat).
  • Dockerfile: copy pnpm-workspace.yaml alongside package.json and pnpm-lock.yaml so the overrides: + allowBuilds: config is present at pnpm install time.
  • package.json: engines.node 20 → 22, removed resolutions (yarn-style, ignored by pnpm v11).
  • pnpm-workspace.yaml: added overrides: section (the migrated resolutions). Without this, pnpm v11 install --frozen-lockfile errors with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH.
  • .dockerignore: exclude node_modules, dist, coverage, .git. Without node_modules excluded, the build context was 1GB and pnpm v11 would try to non-interactively purge incompatible macOS-built modules during the build.

Verified locally:

  • docker build end-to-end ✅ — pnpm install + tsc compile both succeed.
  • Container starts, node --versionv22.22.3.
  • bigint-buffer native binding loads inside the container.
  • pnpm v11.1.2 install --frozen-lockfileDone in 153ms (the case that previously failed).
  • pnpm typecheck and pnpm build clean.

Copy link
Copy Markdown
Contributor

@rapcmia rapcmia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit b54af31

  • Setup on pnpm v11.1.2, node v24.14.1
  • Run pnpm clean (optional); pnpm install; pnpm build
    • Run pnpm run setup:with-defaults (and with certs)
    • Run pnpm start —passphrase=a ( or —dev)
  • Clone another PR and run pnpm install only, no error found ✅
  • Successfully build local docker image ✅

@rapcmia rapcmia merged commit 011ef30 into development May 15, 2026
5 checks passed
@rapcmia rapcmia deleted the fix/pnpm-v11-compatibility branch May 15, 2026 05:19
@rapcmia rapcmia moved this from Under Review to Development 2.15.0 in Pull Request Board May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development 2.15.0

Development

Successfully merging this pull request may close these issues.

2 participants