How to find the version of an installed node.js/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?
转载于:https://stackoverflow.com/questions/10972176/find-the-version-of-an-installed-npm-package