Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognized
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- powershell
调研方向
Start with install.ps1 and the Invoke-InstallHandoff step, then find the self-setup code that reads state\self-setup\*.json and writes the user PATH (HKCU\Environment\Path). Check whether the write is skipped or fails silently, including with a REG_EXPAND_SZ PATH containing %PNPM_HOME% and empty entries. Done means a fresh install on Windows leaves %LOCALAPPDATA%\vite-plus\bin in the user PATH so vp resolves in a new PowerShell session.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
On Windows 11, installing Vite+ with the PowerShell installer completes, but the bin directory (%LOCALAPPDATA%\vite-plus\bin) is never added to the user PATH. In a new PowerShell session, vp is not found:
vp: The term 'vp' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
What I expect: after the installer finishes (and a new terminal is opened), vp resolves from PATH.
What actually happens: the install itself is fine. Every file is in place, state\self-setup\*.json was written, and running vp.exe by its full path works. But the user PATH (HKCU\Environment\Path) has no vite-plus entry. As far as I can tell from install.ps1, the PATH update is delegated to the vp self-setup handoff (Invoke-InstallHandoff); that step apparently ran but never persisted the user PATH change.
This looks similar to #973, but that was on 0.1.x and was fixed by upgrading. This is a fresh install of 1.1.0.
Reproduction
N/A. No project needed; this is a global install issue (steps below).
Steps to reproduce
- On Windows 11 Pro (build 26200), in PowerShell 7.1.4, run:
irm https://vite.plus/ps1 | iex - Open a new PowerShell window.
- Run
vp helporvp env doctor. Result: "The term 'vp' is not recognized…" - Run
& "$env:LOCALAPPDATA\vite-plus\bin\vp.exe" env doctor. It works and reports the PATH problem:
PATH
✗ vp not in PATH
note: Run 'vp env setup' to create the vp shim.
✗ Shim dir not in PATH
note: Expected: C:\Users\<user>\AppData\Local\vite-plus\bin
(All Installation and Configuration checks pass, including shims.)
Possibly relevant: my existing user PATH is a REG_EXPAND_SZ value that contains an unexpanded variable entry (%PNPM_HOME%) and one empty entry (;;). Total length is about 817 characters. I haven't confirmed whether either of these affects the self-setup PATH write.
Workaround: manually prepend %LOCALAPPDATA%\vite-plus\bin to the user PATH and restart the terminal.
System Info
> vp env current
Node.js:
Version 24.21.0
Source lts
Bin Path C:\Users\<user>\AppData\Local\vite-plus\data\js_runtime\node\24.21.0\node.exe
Installed true
Mode managed
> vp --version
vp v1.1.0
OS: Windows 11 Pro 10.0.26200
Shell: PowerShell 7.1.4
Used Package Manager
N/A (global install; no package manager selected yet)
- 主要语言
- Rust
- 星标
- 6k
- 派生
- 274
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 196
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/vite-plus 的其他 Issue
-
`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package manager可能已有人在做 @Crimson341 于 1 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 70/100
voidzero-dev/vite-plus#2970 ·
维护者通常 1 天内回复
-
pending triage
难度 2/5 1-3 小时 新手友好度 72/100
voidzero-dev/vite-plus#2882 · 2 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
voidzero-dev/vite-plus#2097 · 10 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
vp treats a nested project as part of the parent's pnpm workspace, ignoring its own packageManager and lockfile可能已有人在做 @liangmiQwQ 今天认领。 未关闭bug enhancement
voidzero-dev/vite-plus#3013 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Accept arguments before command name (e.g. `vp -r run`)可能重新可做 关联的 PR 已关闭且未合并。 未关闭pending triage
难度 3/5 1-2 天 新手友好度 40/100
voidzero-dev/vite-plus#2983 ·
维护者通常 1 天内回复
查看 voidzero-dev/vite-plus 的全部 Issue
相似的 Issue
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
难度 1/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 76/100
eclipse-zenoh/zenoh#2842 · 2 条评论 ·
维护者通常 1 天内回复
-
中文字符导致软件崩溃未关闭bug
难度 2/5 1-3 小时 新手友好度 62/100
Y-ASLant/ElegantClipboard#172 ·
-
bug documentation
难度 2/5 1-3 小时 新手友好度 78/100
SaboLabs/soroban-devkit#341 ·
维护者通常 1 天内回复
-
agent:sonnet-high enhancement priority: P2 ready-for-agent
难度 2/5 1-3 小时 新手友好度 82/100
shep-pm/shep-kelpie#652 ·
维护者通常 1 天内回复