Check Node.js and npm versions
Read-only
What do risk levels mean?
- Read-only
- Inspects state without changing anything.
- Low risk
- Reversible with a routine follow-up command.
- Medium risk
- Changes state; undo path documented.
- Destructive
- Deletes or overwrites; confirmation required.
Reports the active Node.js and npm versions without changing the runtime or project, so you can confirm that local tooling meets project requirements.
nodenpmversion
Commands
Show the active Node.js runtime version
node --versionShow the npm version paired with the active runtime
npm --versionVerification
node --versionA semantic version is printed for the active Node.js executable.
Undo
Not undoable
This recipe only reads version information and changes nothing.
Pitfalls
- Version managers can select different runtimes in different shells or directories.