PNPM deployments that depend on workspace packages

Đang mở
#997 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
57/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, node.js
Lĩnh vực
build-system

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
174
Fork
390
Merge trung bình
15 giờ 51 phút
Pull request đã merge (30 ngày)
21

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudfoundry/nodejs-buildpack

Tất cả issue của cloudfoundry/nodejs-buildpack

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.