-
Notifications
You must be signed in to change notification settings - Fork 134
Description
Description
Our project members use different Node managers, so we wrote a script to detect whether the current user has fnm, nvm, or vp installed. If found, the script uses that manager to switch Node versions.
However, we've run into an issue: the vp env command only exists in the globally installed version of vp. The version located in node_modules/.bin/vp does not have the env subcommand.
Since our version-switching script is executed via package.json scripts, running npm run switch-node causes the local node_modules/.bin/vp to take precedence over the global one, which leads to a "error: Command 'env' not found" error.
Suggested solution
Provide a dedicated vpenv command (instead of just vp env) upon global installation. This would prevent the vp binary in node_modules/.bin from shadowing the global command and breaking the environment switching functionality.
Alternative
No response
Additional context
No response
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.
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
Start date
Target date
Effort