You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prompt users whether to reinstall a package installed by a different node version in vp update -g #1598
When I made up #1477, I actually thought about a question: should we reinstall the packages installed with a different node version.
For example, you installed oxlint globally with node v21.0.0, but now you are running vp update -g with node v25.0.0.
The reason why I have this question is different nodes can have different installing behaviors, like engine.node compatibility checks or some post-install scripts.
changed the title [-]Should Vite+ re-install packages installed by a different node version?[/-][+]Should Vite+ re-install global packages installed by a different node version?[/+]on May 16, 2026
From a user experience-first perspective, I believe maintaining the current logic and using the user's current Node version for installation is more aligned with expectations. This way, it's consistent with the Node.js version that users perceive when directly using the npm update -g <pkg> command.
I agree on using user's current Node version. Though this problem is worth disucssing, it seems that there are some misunderstandings, I'm sorry I didn't explain clearly in the issue.
I original meant that as #1596 added skipping logic for up-to-date packages, we should also think about whether Vite+ should skip updating packages installed by a different Node version from the current.
As the example above, you installed oxlint@1.65.0 globally with node v21.0.0, but now you are running vp update -g with node v25.0.0, while the oxlint's latest version is sitll 1.65.0, should we skip updating them, or should we still use v21.0.0's node to install them in the future?
My personal idea is deciding on the package's engines.node, even if a package is up to data, Vite+ can still reinstall it if it is installed by an incompatible node while the current Vite+ use a compatible node to update, or a package which is installed by a compatible node but be updated with an incompatible node.
Or add a user confirmation prompt? If the package version hasn't changed, but the Node.js version has changed, should we prompt the user whether they need to upgrade?
changed the title [-]Should Vite+ re-install global packages installed by a different node version?[/-][+]Prompt users whether to reinstall a package installed by a different node version in `vp update -g`[/+]on May 18, 2026
Thanks, the title is updated to fit the new task scope.
By the way, considering vp update can include multiple packages which need updating with a different Node.js version, will it be annoying if we prompt users for every single package? Showing only one prompt for all packages seems better but also less exact. What do you think of it?
Activity
[-]Should Vite+ re-install packages installed by a different node version?[/-][+]Should Vite+ re-install global packages installed by a different node version?[/+]fengmk2 commentedon May 17, 2026
From a user experience-first perspective, I believe maintaining the current logic and using the user's current Node version for installation is more aligned with expectations. This way, it's consistent with the Node.js version that users perceive when directly using the
npm update -g <pkg>command.@cpojer WDYT?
liangmiQwQ commentedon May 17, 2026
I agree on using user's current Node version. Though this problem is worth disucssing, it seems that there are some misunderstandings, I'm sorry I didn't explain clearly in the issue.
I original meant that as #1596 added skipping logic for up-to-date packages, we should also think about whether Vite+ should skip updating packages installed by a different Node version from the current.
As the example above, you installed
oxlint@1.65.0globally withnode v21.0.0, but now you are runningvp update -gwithnode v25.0.0, while theoxlint's latest version is sitll1.65.0, should we skip updating them, or should we still usev21.0.0's node to install them in the future?My personal idea is deciding on the package's
engines.node, even if a package is up to data, Vite+ can still reinstall it if it is installed by an incompatible node while the current Vite+ use a compatible node to update, or a package which is installed by a compatible node but be updated with an incompatible node.fengmk2 commentedon May 18, 2026
Or add a user confirmation prompt? If the package version hasn't changed, but the Node.js version has changed, should we prompt the user whether they need to upgrade?
cpojer commentedon May 18, 2026
Prompting and communicating with the user here makes the most sense, regardless of which solution you are choosing.
[-]Should Vite+ re-install global packages installed by a different node version?[/-][+]Prompt users whether to reinstall a package installed by a different node version in `vp update -g`[/+]liangmiQwQ commentedon May 18, 2026
Thanks, the title is updated to fit the new task scope.
By the way, considering
vp updatecan include multiple packages which need updating with a different Node.js version, will it be annoying if we prompt users for every single package? Showing only one prompt for all packages seems better but also less exact. What do you think of it?feat(cli): prompt for node mismatch reinstall (#1666)