PNPM deployments that depend on workspace packages

Aberta
#997 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
57/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
go, node.js
Domínio
build-system

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Go
Estrelas
174
Forks
390
Merge médio
15h 51min
PRs com merge (30d)
21

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de cloudfoundry/nodejs-buildpack

Todas as issues de cloudfoundry/nodejs-buildpack

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.