Skip to content

devEngines.runtime is not respected by node shim consistently #1948

Description

@Adrian-Baran-GY

Describe the bug

node shim is not respecting devEngines.runtime if added manually to the package.json

Steps to reproduce

  1. Create new directory with simple package.json:

    mkdir test
    npm init --yes
  2. Add following to the package.json:

    "devEngines": {
      "runtime": {
        "name": "node",
        "version": "22.22.0",
        "onFail": "download"
      }
    }
  3. 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 ✅

  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Target date

    None yet

    Start date

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions