Repository navigation
Description
Description
I love using vite-plus for managing my node version
but it only supports node version from .node-version or package.json fields
there are a lot of projects which uses .nvmrc files for node version, either with nvm or a compatible tool that respects .nvmrc
Vite+ should also respect .nvmrc as a source for node version when the other 2 sources are not there. vp migrate already parses .nvmrc and migrates to the supported config sources, but when I am working on a one of fix/feature on a repo I just want vp to resolve the correct node version as changing unrelated files to node version is not something we should be worrying about.
Suggested solution
Add suport for .nvmrc here
.node-version file (current or parent directories)
devEngines.runtime in package.json (the [devEngines standard](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines))
engines.node in package.json
+ .nvmrc file
The global default (vp env default), then the latest LTSAlternative
run vp env use everytime in the repo or add a supported config file in a different PR if the maintainer allows it
Additional context
https://discord.com/channels/1475973262193459293/1479410337223802951/1528691105695137916
https://discord.com/channels/1475973262193459293/1479410337223802951/1528706682148884573
Validations
- Read the Contributing Guidelines.
- Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- Check that there isn't already an issue requesting the same feature.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Start date
Target date
Effort
Activity
liangmiQwQ commentedon Jul 20, 2026
Personally it feels a little strange to let Vite+ support a
nvm-specificconfig, but I think keeping.nvmrcwhile migration by KTrain is reasonable./cc @fengmk2
BlankParticle commentedon Jul 20, 2026
let me know if we end up implementing it, I have a local patch that I was testing, it uses
.node-versionparser to parse.nvmrcand try to support itwill fix up things and PR that if we end up going through it
TheAlexLichter commentedon Jul 21, 2026
I think a good first step would be not removing .nvmrc but that could cause drift. I rather would love to see nvm supporting
.node-versionand have written a comment in nvm-sh/nvm#794 (comment)devmcclu commentedon Jul 22, 2026
Missed this issue when creating my PR for a similar feature!
To quote myself from #2213
I know this can seem very pedantic, but there are still projects out there that use
.nvmrcas their source of truth and aren'tvpmanaged projects. While getting nvm to support.node-versionwould be a good first step to moving a large part of the ecosystem to a unified file, it still doesn't address the fact that.nvmrcis present in a large part of the ecosystem. If I personally wanted to usevpto manage Node.js versions globally on my system, I would have to work around projects that use.nvmrcwhich make it a non-starter for me from a UX perspective.liangmiQwQ commentedon Jul 25, 2026
Context: https://discord.com/channels/1475973262193459293/1479410337223802951/1530521692718501970
feat: add support for `.nvmrc` as node version source (#2244)