Problem
Repos using the reusable build workflows (preview.yml, publish.yml) run pnpm install followed by pnpm run build. In a self-hosting monorepo where one workspace package's build script invokes another workspace package's bin — e.g. an example whose build is clink build, where clink's bin is ./dist/bin.js — the build step fails under pnpm 11:
examples/basic build: sh: clink: command not found
[ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL] @example/basic@ build: `clink build`
[ELIFECYCLE] Command failed with exit code 1.
Why
At pnpm install time the CLI package has not been built yet, so its bin target (packages/<cli>/dist/bin.js) doesn't exist. pnpm 11 refuses to create the .bin/<cli> symlink for a missing target and only warns:
[WARN] Failed to create bin at .../examples/basic/node_modules/.bin/clink.
ENOENT: no such file or directory, open '.../packages/clink/dist/bin.js'
The subsequent pnpm run build builds the CLI (topological order), but the bin is never relinked. pnpm appears to cache "no bin" from the first resolution: after the CLI is built, neither a plain pnpm install nor pnpm install --force recreates the symlink — both report Already up to date and skip linking. So every downstream package that shells out to the CLI bin fails.
This differs from pnpm 10, where the install→build sequence in these workflows worked.
Impact
Any repo on these workflows with a workspace package that builds by invoking a sibling workspace bin. It's latent — CI only hits it once the install+build path actually runs to the dependent packages.
Repro
- pnpm 11.18.0, fresh
pnpm install && pnpm run build.
- Concrete instance: bombshell-dev/clink#43 (see the
preview runs on that PR before the workaround commit).
Problem
Repos using the reusable build workflows (
preview.yml,publish.yml) runpnpm installfollowed bypnpm run build. In a self-hosting monorepo where one workspace package'sbuildscript invokes another workspace package's bin — e.g. an example whosebuildisclink build, whereclink's bin is./dist/bin.js— the build step fails under pnpm 11:Why
At
pnpm installtime the CLI package has not been built yet, so its bin target (packages/<cli>/dist/bin.js) doesn't exist. pnpm 11 refuses to create the.bin/<cli>symlink for a missing target and only warns:The subsequent
pnpm run buildbuilds the CLI (topological order), but the bin is never relinked. pnpm appears to cache "no bin" from the first resolution: after the CLI is built, neither a plainpnpm installnorpnpm install --forcerecreates the symlink — both reportAlready up to dateand skip linking. So every downstream package that shells out to the CLI bin fails.This differs from pnpm 10, where the install→build sequence in these workflows worked.
Impact
Any repo on these workflows with a workspace package that builds by invoking a sibling workspace bin. It's latent — CI only hits it once the install+build path actually runs to the dependent packages.
Repro
pnpm install && pnpm run build.previewruns on that PR before the workaround commit).