Catch Node.js version mismatches before they break your CI — across .nvmrc, engines, and runtime
npx github:NickCirv/node-version-checkOr with the short alias:
npx github:NickCirv/node-version-check nvc --help# Check current project (reads .nvmrc, .node-version, .tool-versions, engines.node)
nvc
# Scan a monorepo — shows engines.node per package with compatibility status
nvc --scan .
nvc --scan ./packages
# Sync .nvmrc and .node-version to match package.json engines.node
nvc --fix
# Check latest LTS vs your running version (fetches from nodejs.org)
nvc --latest
# Compatibility matrix: packages × Node LTS versions
nvc --matrix
# CI mode — exits 1 on mismatch; supports GitHub Actions annotations
nvc ci
nvc ci --format github| Flag | Description |
|---|---|
--scan [dir] | Monorepo walk for engines.node mismatches |
--fix | Update .nvmrc / .node-version from engines.node |
--latest | Live LTS check from nodejs.org |
--matrix [dir] | Package × Node LTS compatibility table |
--dir <path> | Target directory (default: cwd) |
--format github | GitHub Actions annotation output (ci command) |
--help, -h | Show help |
Reads every version-pinning file in your project (.nvmrc, .node-version, .tool-versions, package.json engines.node) and compares each against the Node version currently running. In monorepos, --scan walks all sub-packages and flags inconsistent engines.node ranges. --fix writes the corrected version back to .nvmrc and .node-version after a confirmation prompt. The hand-rolled semver parser supports >=, ^, ~, x, compound ranges, and || — no semver package required.
# .github/workflows/check.yml
- name: Check Node versionrun: npx github:NickCirv/node-version-check ci --format githubExits 0 when all requirements are satisfied; exits 1 and emits ::error:: annotations on mismatch.
| Variable | Effect |
|---|---|
NO_COLOR=1 | Disable colored output |
Zero dependencies · Node >=18 · MIT · by NickCirv