7*4 2012-06-10 20:36 采纳率: 0%
浏览 1038
已采纳

查找已安装 npm 软件包的版本

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

  • 写回答

20条回答 默认 最新

  • from.. 2012-06-11 19:13
    关注

    npm list for local packages or npm list -g for globally installed packages.

    You can find the version of a specific package by passing its name as an argument. For example, npm list grunt will result in:

    projectName@projectVersion /path/to/project/folder
    └── grunt@0.4.1
    

    Alternatively, you can just run npm list without passing a package name as an argument to see the versions of all your packages:

    ├─┬ cli-color@0.1.6 
    │ └── es5-ext@0.7.1 
    ├── coffee-script@1.3.3 
    ├── less@1.3.0 
    ├─┬ sentry@0.1.2 
    │ ├── file@0.2.1 
    │ └── underscore@1.3.3 
    └── uglify-js@1.2.6 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(19条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?