Vendored pnpm deployments
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go, node.js
- Ambito
- build-system
Direzione di ricerca
Start in src/nodejs/supply/supply.go, especially BuildDependencies(), the PNPM interface, and the package-manager selection cases. Compare the existing NPM.Rebuild() implementation in src/nodejs/npm/npm.go; then inspect the supply tests for vendored and pnpm behavior. Done means a vendored pnpm deployment invokes pnpm rebuild rather than pnpm install.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Vendored pnpm deployments run pnpm install instead of pnpm rebuild
Summary
Since v1.9.5 pnpm is officially supported (big thanks) but pnpm projects with a pre-populated node_modules/ (vendored deployments) incorrectly run pnpm install --no-frozen-lockfile instead of pnpm rebuild.
There are two distinct bugs in BuildDependencies().
Bug 1 — case s.UsePNPM has priority over case s.IsVendored
switch {
case s.UseYarn: // L343
s.Yarn.Build(...)
case s.UsePNPM: // L348 ← matched first, PNPM.Build() runs
s.PNPM.Build(...)
case s.IsVendored: // L353 ← never reached when pnpm-lock.yaml is present
s.NPM.Rebuild(...)
...
}
When both flags are set:
s.UsePNPM = true—pnpm-lock.yamlexistss.IsVendored = true—node_modules/exists
PNPM.Build() runs pnpm install, ignoring the pre-populated node_modules/.
Bug 2 — case s.IsVendored hardcodes NPM.Rebuild() regardless of package manager
Even if the ordering were fixed, case s.IsVendored at
supply.go#L353
always calls s.NPM.Rebuild(). A vendored pnpm project should call PNPM.Rebuild(),
which would also require adding Rebuild(string) error to the
PNPM interface at L51–L53
(today only Build(string, string) error exists),
mirroring npm/npm.go#L34–L51.
The same gap likely exists for Yarn vendored deployments.
Use case
We use pnpm deploy --prod to produce a flat node_modules/ layout compatible with the CF buildpack, then push the archive.
The buildpack should detect the pre-populated node_modules/ and skip the install phase, running pnpm rebuild instead to recompile any native addons for the CF stack.
How to reproduce
- Create a minimal pnpm workspace with a
pnpm-lock.yamland a pre-populatednode_modules/. - Run the buildpack supply step.
- Expected:
pnpm rebuildis called. - Actual:
pnpm install --no-frozen-lockfileis called.
- Lingua principale
- Go
- Stelle
- 173
- Fork
- 389
- Merge medio
- 2g 14h
- PR unite (30g)
- 12
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudfoundry/nodejs-buildpack
-
unscheduled
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
cloudfoundry/nodejs-buildpack#683 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
cloudfoundry/nodejs-buildpack#923 ·
I maintainer di solito rispondono entro 1 giorno
-
Misleading "PRO TIP" about missing "package-lock.json" (with `npm-shrinkwrap.json`)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
cloudfoundry/nodejs-buildpack#852 ·
I maintainer di solito rispondono entro 1 giorno
-
unscheduled
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
cloudfoundry/nodejs-buildpack#655 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Supply step do not retry when error is connection reset by peerForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaunscheduled
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
cloudfoundry/nodejs-buildpack#626 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudfoundry/nodejs-buildpack
Issue simili
-
docs: namespaceRegexes example teaches prefix matching, but regexes are matched as a substringApertatriage/pending-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
external-secrets/external-secrets#7117 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ENTERPILOT/GoModel#1183 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Edwin-metcalf/MetCode#16 ·
-
Action Required: Fix Renovate ConfigurationForse già presa @thompson-tomo l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
open-telemetry/opentelemetry-collector#16170 ·
I maintainer di solito rispondono entro 1 giorno
-
Buffer.writeRTX drops the RTCP returned by calc, so NACKs for other lost packets are never sentAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno