简体   繁体   English

如何在 Windows 上运行旧版本的 node.js

[英]How to run older versions of node.js on windows

I want to install v0.8.6 of node along with v0.10 .我想安装v0.8.6v0.10节点。

  1. How can I install NVM on windows如何在 Windows 上安装 NVM

  2. And use it to install older node并使用它来安装旧节点

nvm is suited for linux environments. nvm适用于 linux 环境。 It requires HOME variable to be set where it will put the different node versions.它需要设置HOME变量,它将放置不同的节点版本。 For windows there is nvmw .对于 Windows,有nvmw

Similarly an alternative to nvm is n .同样, nvm的替代方案是n For which the windows version is nodist . Windows 版本是nodist

See this useful blog .请参阅此有用的博客

I've just released a project called NVM for Windows .我刚刚发布了一个名为NVM for Windows的项目。 It comes with an installer and super-easy commands.它带有安装程序和超级简单的命令。

在此处输入图片说明

In a case like mine that I just want to remove the current version and install the older one, I just did it by running the node installer of the current version and select the remove button.在像我这样的情况下,我只想删除当前版本并安装旧版本,我只是通过运行当前版本的节点安装程序并选择删除按钮来完成。 Afterwards, I install the older version.之后,我安装了旧版本。

You can check your current NodeJS version by using the command node -v.您可以使用命令 node -v 检查您当前的 NodeJS 版本。 And changing your version can be done by using node version manager.并且可以通过使用节点版本管理器来更改您的版本。

Use n, an extremely simple Node version manager that can be installed via npm.使用 n,一个非常简单的 Node 版本管理器,可以通过 npm 安装。

npm install -g n   # Install n globally
n 8.16.0           # Install and use v8.16.0 OR any version you want

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM