Memor.の 2013-04-08 23:44 采纳率: 100%
浏览 224
已采纳

安装软件包的以前版本

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

  • 写回答

7条回答 默认 最新

  • 撒拉嘿哟木头 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

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

报告相同问题?

悬赏问题

  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教