Summary
agentv self update can fail with npm not found when AgentV was installed with npm but the current shell has a stripped PATH.
Environment
- OS: Windows 11
- Shell: PowerShell via VS Code extension host terminal
- agentv: 4.22.0 -> 4.24.0
- Install method:
npm install -g agentv
- npm is installed and works in a normal PowerShell session
Reproduction
- Install AgentV globally with npm.
- Launch a shell where
agentv is available but npm is not on PATH.
- Run
agentv self update.
Actual
The update starts, detects npm, then fails with:
Error: npm not found. Try using --bun flag.
Expected
The updater should resolve npm relative to the current Node installation or AgentV install location instead of relying only on the shell PATH.
Notes
Using --bun is not a good workaround for an npm-managed install because it creates a second installation managed by a different package manager.
Summary
agentv self updatecan fail withnpm not foundwhen AgentV was installed with npm but the current shell has a strippedPATH.Environment
npm install -g agentvReproduction
agentvis available butnpmis not onPATH.agentv self update.Actual
The update starts, detects npm, then fails with:
Expected
The updater should resolve npm relative to the current Node installation or AgentV install location instead of relying only on the shell
PATH.Notes
Using
--bunis not a good workaround for an npm-managed install because it creates a second installation managed by a different package manager.