vp run skips pnpm's verifyDepsBeforeRun, so scripts run against stale node_modules
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/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ệ
- nodejs, rust
- Lĩnh vực
- build-system
Hướng nghiên cứu
Reproduce by making a pnpm workspace's lockfile stale, then compare pnpm run <script> (which installs first) with vp run <script> (which does not). Read how vp run launches package.json scripts and whether it can consult pnpm's verifyDepsBeforeRun setting. Done means a stale workspace behaves consistently under vp run, and npm, yarn and bun are unchanged. The maintainers still need to choose between this fix and documenting the gap.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
pnpm 11 made verifyDepsBeforeRun: install the default. Before pnpm run or pnpm exec, pnpm checks that node_modules matches the lockfile and the manifests, and installs first if it doesn't. The check takes about 10 ms when nothing changed.
vp run <script> runs the same package.json scripts itself and does no such check. So after a git pull, a merge or a branch switch that changes the lockfile, pnpm run test works, while vp run test fails with Cannot find module … against stale dependencies.
Tested with vite-plus 1.2.0 and pnpm 12.11.2 on Linux:
- In a workspace with a stale lockfile,
pnpm run <script>installed and then ran. vp run <script>failed withCannot find module.- An
strace -e execveofvp run --filter <pkg> lintshows no pnpm process starting. - Nothing overrides
verifyDepsBeforeRunin the workspace,.npmrc, user config or environment.
Suggested solution
When the workspace's package manager is pnpm, have vp run apply pnpm's verifyDepsBeforeRun setting before running a package.json script: run pnpm's own check, or install, warn or fail as the setting says. With npm, yarn or bun, keep today's behaviour.
Alternative
Document that vp run skips the package manager's dependency check, so teams that rely on it run scripts through pnpm run.
Additional context
This is how our agents and developers got stale node_modules after merges. We now run package scripts with pnpm for this reason.
Validations
- Read the Contributing Guidelines.
- Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- Check that there isn't already an issue requesting the same feature. I searched vite-plus and vite-task for verifyDepsBeforeRun, verify-deps-before-run and stale dependencies.
- Ngôn ngữ chính
- Rust
- Star
- 6k
- Fork
- 274
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 205
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 voidzero-dev/vite-plus
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/vite-plus#2882 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
voidzero-dev/vite-plus#2097 · 10 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
voidzero-dev/vite-plus#3092 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
voidzero-dev/vite-plus#3090 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`vp migrate` copies string `extends` paths from `.oxlintrc.json` into `lint`, which `vp lint` rejectsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
voidzero-dev/vite-plus#3089 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
pop-os/cosmic-comp#2956 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:release criticality:p3 documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
registrystack/registry-stack#2085 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
libp2p/rust-libp2p#6694 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Stack overflow in `check bans` with `include-dependencies = true` and a dev-dependency cycleĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EmbarkStudios/cargo-deny#910 ·