我在Ubuntu 10.10上运行Node.js v0.5.9-pre版本。

我希望使用v0.5.0-pre版本。

如何回滚到节点的旧版本?


当前回答

如果你已经安装了你想要的节点版本,但似乎无法切换到它,试试这个:

nvm use --delete-prefix <version>. npm shows the lates version installed but can't switch to it. If so, this is the output you will see: You need to run "nvm install v16.2.0 Then run:nvm install <type the version you wish to use here>Your output should look like this: Downloading and installing node v16.2.0... Downloading https://nodejs.org/dist/v16.2.0/node-v16.2.0-linux-x64.tar.xz... ####################################################################### 100.0% Computing checksum with sha256sum Checksums matched! Now using node v16.2.0 (npm v7.13.0) Creating default alias: default -> v16.2.0 You are done! You can see the latest version by running: node -v

其他回答

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

窗户

用巧克力降级节点

安装巧克力色。然后运行:

choco install nodejs.install -version 6.3.0

Chocolatey拥有许多可用的Node版本。

Downgrade NPM

npm install -g npm@3.10.3

我在这方面遇到了很多问题,唯一对我有效的解决方案是:

~ / .nvm / nvm.sh来源 NVM是node_version_you_want NVM使用node_version_you_want

出于某种原因,Brew将节点5安装到一个名为node5的单独目录中。

为了回到第5版,我采取了以下步骤:(你需要查找标准的brew安装/卸载,但除此之外,这个过程比看起来要简单得多。)

使用Brew标准安装安装node5,但还没有Brew link。 使用brew unlink节点和brew Uninstall节点卸载所有其他版本的节点。您可能需要使用——force来删除其中一个版本。 在你的电脑上找到地窖文件夹 删除地窖中的节点文件夹。 将node5文件夹重命名为node。 然后,酿造链接节点

节点5应该都设置好了。

另一个用于管理多个版本Node的很好的库是N: https://github.com/visionmedia/n