GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Concurrent `vp run dev` processes download the same Node.js runtime twice · Issue #2642 · voidzero-dev/vite-plus

Concurrent vp run dev processes download the same Node.js runtime twice #2642

New issue
Copy link
New issue
Copy link
Open
Open
Concurrent vp run dev processes download the same Node.js runtime twice#2642
Copy link
Assignees
akim136
Labels
contribution welcomeenhancementNew feature or request

Description

@tnp03
tnp03
opened on Sep 9, 2026
Issue body actions

Describe the bug

When running vp run dev from two separate repositories that require the same managed Node.js version, Vite+ downloads the same Node.js runtime independently for each process instead of coordinating the installation and reusing the shared runtime.

The two repositories are unrelated (API and web), but both resolve to the same Vite+ managed runtime location under the user-level Vite+ directory.

This suggests that the runtime itself is intentionally shared globally, but concurrent vp processes may both observe the runtime as missing and start their own download/install operation.

Expected behavior

If multiple vp processes require the same Node.js version concurrently, only one process should download/install the runtime. Other processes should wait for the installation to complete and then reuse the same runtime.

Conceptually:

API vp run dev  ──┐
                 ├── shared runtime lock ──> download Node 24.21.0 once
Web vp run dev  ──┘                         └─> both reuse it

Actual behavior

Both projects trigger a Node.js download even though they resolve to the same shared managed runtime.

Environment

OS: Windows 11

Node runtime reported by Vite+:

VITE+ - The Unified Toolchain for the Web

Environment:
  Version  24.21.0
  Source   lts

Tool Paths:
  node  C:\Users\<username>\.vite-plus\js_runtime\node\24.21.0\node.exe
  npm   C:\Users\<username>\.vite-plus\js_runtime\node\24.21.0\npm.cmd
  npx   C:\Users\<username>\.vite-plus\js_runtime\node\24.21.0\npx.cmd

Why this seems like a Vite+ issue

The managed Node runtime is stored in a user-level shared location rather than inside either repository. Therefore, downloading the same runtime independently for concurrent projects appears unnecessary and can waste bandwidth and startup time.

A related issue, #2449, shows that vp run provisions managed Node.js runtimes, but that issue concerns interrupted downloads rather than concurrent deduplication:
#2449

Suggested solution

Add cross-process synchronization around managed Node.js runtime installation, keyed by runtime/platform/version. For example, a filesystem lock around the shared runtime directory could allow one process to perform the download while other processes wait and then reuse the installed runtime.

Validations

  • Checked the existing Vite+ issues for a duplicate report.
  • Confirmed both projects resolve to the same global managed Node.js runtime.
  • This appears specific to Vite+'s managed runtime provisioning rather than the projects themselves.

Activity

  1. liangmiQwQ
    added the
    Feature
    issue type on Sep 11, 2026
  2. liangmiQwQ
    removed the
    Feature
    issue type on Sep 11, 2026
  3. liangmiQwQ
    added
    enhancementNew feature or request
    on Sep 11, 2026
  4. akim136 commented on Sep 17, 2026

    @akim136
    akim136
    on Sep 17, 2026
    More actions

    Had a look at this because I was thinking of picking it up, and the design already exists in the repo. rfcs/js-runtime.md has "Acquire file lock (prevent concurrent installs)" as step 5 of the install flow, a "Concurrent Download Protection" section describing file-based locking plus a re-check of the cache after acquiring the lock, and a concurrent-download case in its test plan. So this looks less like a feature request and more like a gap between the RFC and what shipped.

    What I cannot tell from outside is how much of it landed. crates/vp_js_runtime/Cargo.toml pulls in tempfile, so the atomic-rename half seems to be there, but I do not see a file-locking crate listed. That could just mean it is done with std directly, or that the lock step is not wired up yet.

    Would you welcome a PR adding cross-process locking around managed runtime install, keyed by runtime/platform/version the way @tnp03 describes? The RFC says "same pattern as PackageManager", so I would follow that if you can point me at where it lives.

    Happy to leave it alone if this is already in flight or you would rather design it in-house. Just wanted to ask before setting up the Rust toolchain for it.

    Reacted by Liang
  5. liangmiQwQ
    added
    contribution welcome
    on Sep 26, 2026
  6. liangmiQwQ commented on Sep 26, 2026

    @liangmiQwQ
    liangmiQwQ
    on Sep 26, 2026
    Collaborator
    More actions

    Had a look at this because I was thinking of picking it up, and the design already exists in the repo. rfcs/js-runtime.md has "Acquire file lock (prevent concurrent installs)" as step 5 of the install flow, a "Concurrent Download Protection" section describing file-based locking plus a re-check of the cache after acquiring the lock, and a concurrent-download case in its test plan. So this looks less like a feature request and more like a gap between the RFC and what shipped.

    What I cannot tell from outside is how much of it landed. crates/vp_js_runtime/Cargo.toml pulls in tempfile, so the atomic-rename half seems to be there, but I do not see a file-locking crate listed. That could just mean it is done with std directly, or that the lock step is not wired up yet.

    Would you welcome a PR adding cross-process locking around managed runtime install, keyed by runtime/platform/version the way @tnp03 describes? The RFC says "same pattern as PackageManager", so I would follow that if you can point me at where it lives.

    Happy to leave it alone if this is already in flight or you would rather design it in-house. Just wanted to ask before setting up the Rust toolchain for it.

    Thanks for that! Since Vite+ is now on RC, you can start implementing it, but this might be handled after version 1.0.

  7. liangmiQwQ
    assigned
    akim136
    on Sep 26, 2026
  8. fengmk2
    added a commit that references this issue on Oct 14, 2026

    chore(deps): update rust crates (#1780)

    62de578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @akim136
    akim136

Labels

contribution welcomeenhancementNew feature or request

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.