Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Vendored pnpm deployments

オープン
#957 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@ivanovac がすでに取り組んでいます。

2026年10月12日 から。

  • #964 @ivanovac による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, node.js
領域
build-system

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

supply.go#L342–L363

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:

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
  1. Create a minimal pnpm workspace with a pnpm-lock.yaml and a pre-populated node_modules/.
  2. Run the buildpack supply step.
  3. Expected: pnpm rebuild is called.
  4. Actual: pnpm install --no-frozen-lockfile is called.
主要言語
Go
スター
173
フォーク
389
平均マージ
2日 14時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudfoundry/nodejs-buildpack のほかの issue

cloudfoundry/nodejs-buildpack の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。