?yb? 2013-04-08 23:44 采纳率: 100%
浏览 260
已采纳

安装软件包的以前版本

I used nvm to download node v0.4.10 and installed npm to work with that version of node.

I am trying to install express using

npm install express -g

and I get an error that express requires node version >= 0.5.0.

Well, this is odd, since I am following the directions for a node+express+mongodb tutorial here that used node v0.4.10, so I am assuming express is/was available to node v0.4.10. If my assumption is correct, how do I tell npm to fetch a version that would work with my setup?

转载于:https://stackoverflow.com/questions/15890958/install-a-previous-version-of-a-package

  • 写回答

8条回答 默认 最新

  • Memor.の 2013-04-09 02:01
    关注

    If you have to install an older version of a package, just specify it

    npm install <package>@<version>
    

    For example: npm install express@3.0.0

    You can also add the --save flag to that command to add it to your package.json dependencies, or --save --save-exact flags if you want that exact version specified in your package.json dependencies.

    The install command is documented here: https://docs.npmjs.com/cli/install

    If you're not sure what versions of a package are available, you can use:

    npm view <package> versions
    

    And npm view can be used for viewing other things about a package too. https://docs.npmjs.com/cli/view

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(7条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 R语言卸载之后无法重装,显示电脑存在下载某些较大二进制文件行为,怎么办
  • ¥15 java 的protected权限 ,问题在注释里