How can I find the version of an installed Node.js or npm package?
This prints the version of npm itself:
npm -v <package-name>
This prints a cryptic error:
npm version <package-name>
This prints the package version on the registry (i.e., the latest version available):
npm view <package-name> version
How do I get the installed version?
npm show
shows the latest in npm, not installednpm pkg get version
.