How to find the version of an installed node.js/npm package ?
(如何找到已安装的node.js / npm 软件包的版本?)
This prints the version of npm itself:
(这将打印npm本身的版本:)
npm -v <package-name>
This prints a cryptic error:
(这将显示一个神秘的错误:)
npm version <package-name>
This prints the package version on the registry (ie the latest version available):
(这将在注册表上打印软件包版本(即可用的最新版本):)
npm view <package-name> version
How do I get the installed version ?
(如何获得安装的版本 ?)
ask by Laurent Couvidou translate from so