Skip to content

vp env use without arguments does not unset VITE_PLUS_NODE_VERSION #951

@Anoesj

Description

@Anoesj

Describe the bug

In the following scenario, the DX of running vp env use is suboptimal. As an end user, I would expect vp env use to revert back to the local or, if absent, the global default version of Node.

Reproduction

Command line issue, please reproduce locally

Steps to reproduce

In the root directory of an app using vp, run:

  • vp env pin lts
  • vp env use -> Using Node.js v24.14.0 (resolved from .node-version)
  • vp env use 22 -> Using Node.js v22.22.1 (resolved from 22)
  • ⚠️ vp env use -> Using Node.js v22.22.1 (resolved from VITE_PLUS_NODE_VERSION)

In the final step, one would expect to see Using Node.js v24.14.0 (resolved from .node-version).

When running vp env current, that also shows it's using Node v22.22.1.

Ideally, VITE_PLUS_NODE_VERSION is unset when running vp env use without any provided version, so vp can use the local or global default again.

System Info

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

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions