如何在 Windows 上安装旧版本的 node.js?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33849714/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install older version of node.js on Windows?
提问by irynabond
I need to install node.js of version 4.0.0 I tried this:
我需要安装 4.0.0 版本的 node.js 我试过这个:
npm install -g [email protected]
But I got this message: npm is not recognized as an internal or external command, operable program or batch file
但是我收到这条消息:npm 不是内部或外部命令,也不是可运行的程序或批处理文件
回答by simon-p-r
Go hereand find the version you want to install and then download the correct msi file and run the installer. You cannot install node by running this command, also the error you receive is stating that npm is not on your path which suggests machine doesn't currently have node installed on it
走在这里找到你想要安装,然后下载正确的MSI文件的版本并运行安装程序。您无法通过运行此命令来安装节点,而且您收到的错误是指出 npm 不在您的路径上,这表明机器当前没有安装节点
回答by hoogw
For windows, best is: nvm-windows
对于 Windows,最好是:nvm-windows
1)install the .exe
1)安装.exe
2)restart (otherwise, nvm will not be undefined)
2)重启(否则nvm不会undefined)
3)run CMD as admin,
3)以管理员身份运行CMD,
4)nvm use 5.6.0
4)nvm 使用 5.6.0
Note: You MUST run as Admin to switch node version every time.
注意:您必须以管理员身份运行才能每次切换节点版本。
回答by Alok Ranjan
Just uninstall whatever node version you have in your system. Then go to this site https://nodejs.org/download/release/and choose your desired version like for me its like v7.0.0/ and click on that go get .msifile of that. Finally you will get installer in your system, so install it. It will solve all your problems.
只需卸载您系统中的任何节点版本。然后转到此站点https://nodejs.org/download/release/并选择您想要的版本,例如 v7.0.0/,然后单击该站点以获取该 版本的.msi文件。最后你会在你的系统中得到安装程序,所以安装它。它会解决你所有的问题。
回答by Dixon Yant
run:
跑:
npm install -g [email protected]
npm install -g [email protected]
- or whatever version you want after the @ symbol (This works as of 2019)
回答by Darush
You can use Nodistfor this purpose. Download it from here.
Usage:
用法:
nodist List all installed node versions.
nodist list
nodist ls
nodist <version> Use the specified node version globally (downloads the executable, if necessary).
nodist latest Use the latest available node version globally (downloads the executable, if necessary).
nodist add <version> Download the specified node version.
More Nodist commands here
更多 Nodist 命令在这里

