GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — `npm install -g` keeps the `bin` link on the old version after the default Node.js changes · Issue #3279 · voidzero-dev/vite-plus Closed Copy link Labels DescriptionDescribe the bugWhen Vite+ manages Node.js, When the active Node.js version changes (for example, the latest LTS moves from 24 to 26), I run Expected: the link points to the copy that npm just installed, or Vite+ tells me that it kept the old link. Cause: in vite-plus/crates/vp_global_cli/src/shim/dispatch.rs Lines 287 to 313 in 7073d61
Possible fix: also replace the link when the same package owns it but the link target is not in the current npm bin directory. Write the new I can submit a PR for this fix. Related: #1986 (general discussion about ReproductionNo repository is necessary. This is global CLI behavior. See the steps below. Steps to reproduce# 1. Install a package with an older default Node.js version vp env default 24 npm install -g cowsay # Answer "Y" to create the link ls -l ~/.vite-plus/bin/cowsay # -> .../js_runtime/node/24.x.y/bin/cowsay # 2. Change the default Node.js version, then install the package again vp env default 26 npm install -g cowsay # npm reports success; Vite+ prints nothing ls -l ~/.vite-plus/bin/cowsay # Still -> .../node/24.x.y/bin/cowsay cat ~/.vite-plus/bins/cowsay.json # "nodeVersion" is still 24.x.y # The new copy exists, but the link does not use it ls ~/.vite-plus/js_runtime/node/26.*/lib/node_modules/cowsay Workaround: remove the link ( On my machine, 7 links point to old Node.js versions (24.15.0, 24.18.0, 24.21.0), while the active version is 26.13.0. System Info$ vp env current Environment: Version 26.13.0 Source lts Tool Paths: node /Users/user/.vite-plus/js_runtime/node/26.13.0/bin/node npm /Users/user/.vite-plus/js_runtime/node/26.13.0/bin/npm npx /Users/user/.vite-plus/js_runtime/node/26.13.0/bin/npx $ vp --version vp v0.2.1 Local vite-plus: vite-plus Not found Environment: Package manager Not found Node.js v26.13.0 macOS, npm 10.9.9. The code at the link above is from current Used Package Managernpm Activity
MetadataMetadataAssigneesLabelsTypeFieldsPriority None yet Effort None yet Target date None yet Start date None yet ProjectsMilestoneRelationshipsDevelopmentIssue 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. |