PNPM deployments that depend on workspace packages

Offen
#997 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
57/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
go, node.js
Bereich
build-system

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Go
Sterne
174
Forks
390
Ø Merge
15 Std. 51 Min.
Gemergte PRs (30 T.)
21

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus cloudfoundry/nodejs-buildpack

Alle Issues in cloudfoundry/nodejs-buildpack

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.