pnpm 11: workspace pkg building via a sibling workspace CLI bin fails (bin never linked)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- github-actions
- Lĩnh vực
- build-system, ci-cd
Hướng nghiên cứu
Bắt đầu với các workflow có thể tái sử dụng có tên preview.yml và publish.yml, sau đó tái hiện chuỗi pnpm 11.18.0 bằng một pnpm install && pnpm run build mới. So sánh hành vi với pnpm 10 và các lần chạy preview của clink#43; được xem là hoàn tất khi một package trong workspace có thể gọi thành công một CLI bin của workspace anh em trong quá trình build workflow.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Repos using the reusable build workflows (preview.yml, publish.yml) run pnpm install followed by pnpm run build. In a self-hosting monorepo where one workspace package's build script invokes another workspace package's bin — e.g. an example whose build is clink build, where clink's bin is ./dist/bin.js — the build step fails under pnpm 11:
examples/basic build: sh: clink: command not found
[ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL] @example/basic@ build: `clink build`
[ELIFECYCLE] Command failed with exit code 1.
Why
At pnpm install time the CLI package has not been built yet, so its bin target (packages/<cli>/dist/bin.js) doesn't exist. pnpm 11 refuses to create the .bin/<cli> symlink for a missing target and only warns:
[WARN] Failed to create bin at .../examples/basic/node_modules/.bin/clink.
ENOENT: no such file or directory, open '.../packages/clink/dist/bin.js'
The subsequent pnpm run build builds the CLI (topological order), but the bin is never relinked. pnpm appears to cache "no bin" from the first resolution: after the CLI is built, neither a plain pnpm install nor pnpm install --force recreates the symlink — both report Already up to date and skip linking. So every downstream package that shells out to the CLI bin fails.
This differs from pnpm 10, where the install→build sequence in these workflows worked.
Impact
Any repo on these workflows with a workspace package that builds by invoking a sibling workspace bin. It's latent — CI only hits it once the install+build path actually runs to the dependent packages.
Repro
- pnpm 11.18.0, fresh
pnpm install && pnpm run build. - Concrete instance: bombshell-dev/clink#43 (see the
previewruns on that PR before the workaround commit).
- Ngôn ngữ chính
- TypeScript
- Star
- 4
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bombshell-dev/automation
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
bombshell-dev/automation#34 ·
Tất cả issue của bombshell-dev/automation
Issue tương tự
-
module-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ports get and web print 'Port N already in use, trying next...' for every busy port they skipĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
appandflow/stim#1604 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
lingdojo/kana-dojo#31060 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SSH workspace restore rewrites relative symlinks into the deleted sync-back staging directoryĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
paperclipai/paperclip#14173 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày