我在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
我知道这个问题很久以前就被问过了,但也许它对其他人有帮助。 我可以向那些正在寻找在不同版本的NodeJS之间切换的人推荐这个实用程序(NVS - Node Version Switcher):
https://github.com/jasongin/nvs
使用以下命令与您的版本号
nvm install v8.9
nvm alias default v8.9
nvm use v8.9
我发现最简单的方法就是使用nodejs.org网站:
访问https://nodejs.org/en/download/releases/ 找到你想要的版本,然后点击下载 在MAC上单击.pkg可执行文件,并按照安装说明(不确定windows下正确的可执行文件是什么) 现在您已经在所需的节点版本上了
一种方法是使用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)