Describe the bug
node shim is not respecting devEngines.runtime if added manually to the package.json
Steps to reproduce
-
Create new directory with simple package.json:
mkdir test
npm init --yes
-
Add following to the package.json:
"devEngines": {
"runtime": {
"name": "node",
"version": "22.22.0",
"onFail": "download"
}
}
-
The output from vp env current is:
VITE+ - The Unified Toolchain for the Web
Environment:
Version 22.22.0
Source devEngines.runtime
Source Path ~/ps/test/package.json
Project Root ~/ps/test
Tool Paths:
node ~/.vite-plus/js_runtime/node/22.22.0/bin/node
npm ~/.vite-plus/js_runtime/node/22.22.0/bin/npm
npx ~/.vite-plus/js_runtime/node/22.22.0/bin/npx
which is expected ✅
-
The output from node --version is:
v24.18.0
which is wrong ❌
Note that if instead of manually adding devEngines.runtime I do vp env pin 22.22.0 then both vp env current and node --version report the same version (22.22.0).
System Info
vp env current
VITE+ - The Unified Toolchain for the Web
Environment:
Version 24.18.0
Source lts
Tool Paths:
node ~/.vite-plus/js_runtime/node/24.18.0/bin/node
npm ~/.vite-plus/js_runtime/node/24.18.0/bin/npm
npx ~/.vite-plus/js_runtime/node/24.18.0/bin/npx
vp --version
VITE+ - The Unified Toolchain for the Web
vp v0.2.1
Local vite-plus:
vite-plus Not found
Tools:
vite Not found
rolldown Not found
vitest Not found
oxfmt Not found
oxlint Not found
oxlint-tsgolint Not found
tsdown Not found
Environment:
Package manager Not found
Node.js v24.18.0
Used Package Manager
npm
Validations
Describe the bug
nodeshim is not respectingdevEngines.runtimeif added manually to thepackage.jsonSteps to reproduce
Create new directory with simple
package.json:mkdir test npm init --yesAdd following to the
package.json:The output from
vp env currentis:which is expected ✅
The output from
node --versionis:v24.18.0which is wrong ❌
Note that if instead of manually adding
devEngines.runtimeI dovp env pin 22.22.0then bothvp env currentandnode --versionreport the same version (22.22.0).System Info
vp env currentvp --versionUsed Package Manager
npm
Validations