Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

pnpm 11: workspace pkg building via a sibling workspace CLI bin fails (bin never linked)

Aperta
#33 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
github-actions

Direzione di ricerca

Inizia con i workflow riutilizzabili denominati preview.yml e publish.yml, quindi riproduci la sequenza di pnpm 11.18.0 con un pnpm install && pnpm run build eseguito da zero. Confronta il comportamento con pnpm 10 e le esecuzioni di preview di clink#43; il lavoro è completato quando un package del workspace può invocare correttamente un CLI bin di un workspace fratello durante la build del workflow.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).
Lingua principale
TypeScript
Stelle
4
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bombshell-dev/automation

Tutte le issue di bombshell-dev/automation

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.