PNPM deployments that depend on workspace packages

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, node.js
Ambito
build-system

Direzione di ricerca

Start by locating the staging path that runs pnpm rebuild --recursive when vendored node_modules are detected. Add an app-level opt-out while keeping rebuilding enabled by default, document the choice, and test both default and opt-out behavior.

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

Descrizione

When a Node.js app includes vendored node_modules, the buildpack detects it and runs pnpm rebuild --recursive during staging. This is useful for rebuilding native modules, but it fails for deployments containing injected workspace packages whose source directories aren’t included in the uploaded app.

We deploy a pnpm workspace package using pnpm deploy --config.inject-workspace-packages=true. The resulting lockfile references a sibling workspace package as a local directory from the CI checkout. During staging, that checkout path doesn’t exist in the CF container, and pnpm rebuild fails while trying to compute the package packlist:

ERR_PNPM_FS_PACKLIST_IO
I/O error while computing packlist for /home/runner/work/ai-sdk-js/ai-sdk-js/sample-code:
No such file or directory

Environment: Node.js buildpack 1.9.7, cflinuxfs5, Node 24.22.1, pnpm 12.15.0.

Could the buildpack provide a documented, app-level opt-out for rebuilding vendored dependencies while keeping the current behavior as the default? Skipping rebuild should be an explicit choice, since native modules may need rebuilding for the target runtime.

Related: https://github.com/cloudfoundry/nodejs-buildpack/issues/978, which also causes issues.

Lingua principale
Go
Stelle
174
Fork
390
Merge medio
15h 51m
PR unite (30g)
21

Preparare l'ambiente

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 cloudfoundry/nodejs-buildpack

Tutte le issue di cloudfoundry/nodejs-buildpack

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.