我在Ubuntu 10.10上运行Node.js v0.5.9-pre版本。
我希望使用v0.5.0-pre版本。
如何回滚到节点的旧版本?
我在Ubuntu 10.10上运行Node.js v0.5.9-pre版本。
我希望使用v0.5.0-pre版本。
如何回滚到节点的旧版本?
当前回答
一种方法是使用NVM,即节点版本管理器。
使用以下命令获取nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
你可以在https://github.com/creationix/nvm上找到它
它允许您轻松地安装和管理多个版本的node。下面是帮助中的一个片段:
Usage:
nvm install <version> Download and install a <version>
nvm use <version> Modify PATH to use <version>
nvm ls List versions (installed versions are blue)
其他回答
NIX (Linux, OS X, ...)
使用n,一个非常简单的Node版本管理器,可以通过npm安装。
假设你想要Node.js v0.10。x来构建Atom。
npm install -g n # Install n globally
n 0.10.33 # Install and use v0.10.33
Usage:
n # Output versions installed
n latest # Install or activate the latest node release
n stable # Install or activate the latest stable node release
n <version> # Install node <version>
n use <version> [args ...] # Execute node <version> with [args ...]
n bin <version> # Output bin path for <version>
n rm <version ...> # Remove the given version(s)
n --latest # Output the latest node version available
n --stable # Output the latest stable node version available
n ls # Output the versions of node available
窗户
使用nvm- Windows,它类似于nvm,但适用于Windows。下载并运行安装程序,然后:
nvm install v0.10.33 # Install v0.10.33
nvm use v0.10.33 # Use v0.10.33
Usage:
nvm install [version] # Download and install [version]
nvm uninstall [version] # Uninstall [version]
nvm use [version] # Switch to use [version]
nvm list # List installed versions
如果你已经为我安装了curl,请按照以下步骤操作
Sudo snap remove curl Sudo apt安装卷曲 NVM安装12.2.0
另一个用于管理多个版本Node的很好的库是N: https://github.com/visionmedia/n
在windows 7上,我使用了通用的“卸载Node.js”(刚开始在搜索左下角的主菜单字段中输入),然后点击链接到符合项目的旧版本,例如: Windows 64位安装程序:https://nodejs.org/dist/v4.4.6/node-v4.4.6-x64.msi
我发现安装特定版本node.js的最简单方法:
首先卸载你的node.js 访问https://nodejs.org/en/download/releases/,找到你想要的版本。
选择您的版本并单击下载按钮。 下载。msi文件