You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.yaml and a pre-populated node_modules/.
Run the buildpack supply step.
Expected: pnpm rebuild is called.
Actual: pnpm install --no-frozen-lockfile is called.
Activity
ivanovac commentedon Oct 12, 2026
@bvincent Please, check the pr #964
bvincent commentedon Oct 12, 2026
I made a review, thanks for the fix.