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

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

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


当前回答

我发现最简单的方法是

卸载当前版本 从https://nodejs.org/download/release/下载相应版本的。msi安装程序(x64或x86)

其他回答

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

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

我的节点版本是6.4.0。

由于我需要旧版本的6.3.0,我刚刚在我的系统中重新安装了6.3.0版本。节点版本自动降级。

因此,为了降低节点版本, 只需要安装旧版本的node js。它会自动从更高的版本降级。

我在osx试过。这招很管用。

现在v0.5.0-pre已经走到了生命的尽头。我们可以使用npx来使用node的任何稳定的旧版本。例如,最早的稳定版本是4.9.0。

npx -p node@4.9.0 -- node -v

使用以下命令与您的版本号

nvm install v8.9
nvm alias default  v8.9
nvm use v8.9

我发现最简单的方法是

卸载当前版本 从https://nodejs.org/download/release/下载相应版本的。msi安装程序(x64或x86)