Describe the bug
According to js_executor.rs, almost all JS based vp commands will use project_runtime set by vp env
So, if users set an incompatible node version out of the scope of "^20.19.0 || >=22.12.0" which set in "vite-plus"'s package.json, some vp commands will be unusable because of missing utils, unknown extensions or other issues.
I think this is not completely a bug but a design discussion. And I don't know whether is just an expected behavior.
Only vp has the problem because other node version managers do not have JS part so there are no responsibility for them to make sure other js tools run correctly.
But vp has its own node part and integrated some js tools, so it became hard to decide whether we should ensure other vp tools to run no matter node version is set.
I've tried making fixes for it, I previously thought perhaps a feasible solution is to switch a compatible node versions for vp commands, but I found it really complex as there are commands like vp test, vp run which runs users' code in codebase, and vp install which should not only care vp's node version scope but also respect package manger's. So maybe more discussions are needed on this topic.
Thanks.
Reproduction
https://github.com/liang-demos/vp-node-version
Steps to reproduce
https://github.com/liang-demos/vp-node-version#readme
Validations
Describe the bug
According to
js_executor.rs, almost all JS based vp commands will useproject_runtimeset byvp envSo, if users set an incompatible node version out of the scope of
"^20.19.0 || >=22.12.0"which set in "vite-plus"'s package.json, some vp commands will be unusable because of missing utils, unknown extensions or other issues.I think this is not completely a bug but a design discussion. And I don't know whether is just an expected behavior.
Only vp has the problem because other node version managers do not have JS part so there are no responsibility for them to make sure other js tools run correctly.
But vp has its own node part and integrated some js tools, so it became hard to decide whether we should ensure other vp tools to run no matter node version is set.
I've tried making fixes for it, I previously thought perhaps a feasible solution is to switch a compatible node versions for vp commands, but I found it really complex as there are commands like
vp test,vp runwhich runs users' code in codebase, andvp installwhich should not only care vp's node version scope but also respect package manger's. So maybe more discussions are needed on this topic.Thanks.
Reproduction
https://github.com/liang-demos/vp-node-version
Steps to reproduce
https://github.com/liang-demos/vp-node-version#readme
Validations