Skip to content

vp env Resolve cache not invalidated when version configuration changes #840

@marwanhilmi

Description

@marwanhilmi

Describe the bug

Commands that modify Node.js version configuration (vp env default, vp env pin, vp env unpin) do not invalidate the resolve cache (~/.vite-plus/cache/resolve_cache.json), causing node to resolve to a stale version until the cache expires.

Reproduction

.

Steps to reproduce

From a directory with no .node-version file

node -v          # → v24.14.0 (LTS fallback, now cached)
vp env default 25
# ✓ Default Node.js version set to 25.8.1
node -v          # → v24.14.0 (stale cache hit)

Similar issue with vp env pin:

node -v          # → v24.14.0 (cached)
vp env pin 25
# ✓ Pinned Node.js version to 25.8.1
node -v          # → v24.14.0 (stale cache hit)
rm ~/.vite-plus/cache/resolve_cache.json
node -v          # → v25.8.1 (no cache hit)
Image

System Info

❯ vp env current
VITE+ - The Unified Toolchain for the Web

Environment:
  Version       25.8.1
  Source        .node-version
  Source Path   /Users/m/information-fact/.node-version
  Project Root  /Users/m/information-fact

Tool Paths:
  node  /Users/m/.vite-plus/js_runtime/node/25.8.1/bin/node
  npm   /Users/m/.vite-plus/js_runtime/node/25.8.1/bin/npm
  npx   /Users/m/.vite-plus/js_runtime/node/25.8.1/bin/npx



❯ vp --version
VITE+ - The Unified Toolchain for the Web

vp v0.1.11

Local vite-plus:
  vite-plus  v0.1.11

Tools:
  vite             v8.0.0
  rolldown         v1.0.0-rc.9
  vitest           v4.1.0
  oxfmt            v0.40.0
  oxlint           v1.55.0
  oxlint-tsgolint  v0.16.0
  tsdown           v0.21.2

Used Package Manager

pnpm

Logs

Validations

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions