javascript 降级 NodeJs 版本和 express 版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10634388/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 10:32:04  来源:igfitidea点击:

Downgrade NodeJs Version and express version

javascriptnode.jsexpress

提问by theintersect

Currently I am working on a nodejs project. I have installed Express 3.X which is in alpha stage, and my node version is also at 0.7.2-pre. I am currently trying to downgrade my express version, via npm, but it seems that i have to downgrade my node version as well.

目前我正在研究一个 nodejs 项目。我已经安装了处于 alpha 阶段的 Express 3.X,我的节点版本也是 0.7.2-pre。我目前正在尝试通过 npm 降级我的 express 版本,但似乎我也必须降级我的节点版本。

What is the best way to achieve this? How do i down grade my node version. Thank you very much.

实现这一目标的最佳方法是什么?我如何降级我的节点版本。非常感谢你。

回答by BFil

To easy the node version management you can use an npm package called n

为了简化节点版本管理,您可以使用名为n的 npm 包

回答by Julian Knight

There are tools that allow you to have multiple versions of Node installed - e.g. NVM- so you could do that.

有一些工具可以让你安装多个版本的 Node——例如NVM——所以你可以这样做。

However, to answer the question, you will need to re-install Node I'm afraid. Thankfully installing from source is pretty easy though a little slow. Just follow the installation instructions on the GitHub page.

但是,要回答这个问题,恐怕您需要重新安装 Node。值得庆幸的是,从源代码安装很容易,虽然有点慢。只需按照GitHub 页面上的安装说明进行操作即可。