Skip to content

Node version resolution doesn't match the behavior of vp env by default #128

Closed

Description

@JstnMcBrd

One of the things I like most about vp is that I don't have to think about node versions at all. It just looks at .node-version, then devEngines.runtime, then engines.node, then .nvmrc, and picks the right one automatically. No commands required, no extra config.

I was surprised to find that setup-vp doesn't work the same way. According to the README, if you don't pass node-version or node-version-file, it just defaults to latest LTS instead of doing that same lookup.

So if my project only declares its node version through devEngines.runtime, the action silently ignores that and grabs the latest LTS, unless I explicitly tell it node-version-file: package.json. And if I switch from devEngines.runtime to .node-version someday, vp will just work automatically, but setup-vp will not work unless I remember to update node-version-file.

This caught me off guard because I expected the action to behave like vp itself does. Having to manually point it at a file feels like extra config for something that should just work out of the box, and it's an easy way to end up with CI silently running a different node version than local dev.

Most of all, it feels inconsistent with how vp already behaves.

Would it be possible to make setup-vp just use vp's normal node version resolution when no explicit input is given, instead of defaulting to LTS?

- await exec("vp", ["env", "use", nodeVersion]);
+ await exec("vp", ["env", "use"]); // Rely on `vp` to resolve

Note:

I'm basing this off of the documentation in the README. When I read the code in index.ts and inputs.ts, I wasn't able to find where node-version defaults to LTS.

If it doesn't, then my request might be irrelevant because vp would use the normal node resolution after all. If that's the case, then I simply ask for the documentation to be updated.

Activity

  1. fengmk2 commented on Aug 18, 2026

    @fengmk2
    Member

    That should be the logic as you understand it. Let me first add a test to see if I can reproduce this issue.

  2. self-assigned this
    on Aug 18, 2026
  3. fengmk2 commented on Aug 18, 2026

    @fengmk2
    Member

    @JstnMcBrd #130 My test did not reproduce the issue you mention.
    Which version of setup-vp are you using?

  4. JstnMcBrd commented on Aug 18, 2026

    @JstnMcBrd
    Author

    Thanks for your quick response.

    I am not using setup-vp (yet).

    To clarify, this is something I noticed when reading the docs in the README, not something I noticed at runtime. I took the docs at face value and opened this issue because of the implications.

    If the actual behavior of setup-vp does not match what the README implies, then the README should be updated.


    For context:

    https://github.com/voidzero-dev/setup-vp#inputs

    Input Description Required Default
    node-version Node.js version to install via vp env use No Latest LTS
    node-version-file Path to file containing Node.js version (.nvmrc, .node-version, .tool-versions, package.json) No

    If you don't provide a value for node-version, does it actually default to Latest LTS? Or does it let vp auto-recognize the project default (even without providing node-version-file)?

    The README implies the former, but the code (and your test) imply the latter. Could you clarify?

  5. fengmk2 commented on Aug 19, 2026

    @fengmk2
    Member

    @JstnMcBrd Thanks for the feedback. The documentation isn’t clear enough about this. I’ll improve it.

  6. added a commit that references this issue on Sep 4, 2026
    e8f4d95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions