3

windows10安装多个版本node

 2 years ago
source link: https://segmentfault.com/a/1190000040849079
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

windows10安装多个版本node

发布于 10 月 22 日

1.vue2/vue3
2.电脑系统 windows10专业版
3.在使用vue2/vue3开发项目的使用,我们需要安装node,然后配置node环境,但是我们有的时候需要使用node高一点的版本,有的时候需要使用node低一点的版本,那么我们如何同时安装多个node版本呢?又怎么切换node版本呢?
4.首先查看node版本
image.png

在终端输入命令:node -v
通过命令:我们知道,此时的node版本为 16.10.0

4-1.但是我们有时候需要低版本的node,此时我们怎么安装node低版本,又怎么切换呢?

首先进入node官网,找到 其它下载

image.png

//滚动到最下面,点击 以往的版本

image.png

//下载你需要的版本

image.png
5.解压下载的文件,你会得到:
image.png

把下载node文件(需要安装的node版本)复制到node安装路径,然后配置环境变量

image.png
5-1.怎么切换node版本呢?

//查看 当前node版本

image.png

//查看当前有多少node版本

image.png

//怎么切换 node版本?
//把环境变量对应的node版本的位置移动到第一

image.png

//再次查看 node版本

image.png
6.本期的分享到了这里就结束啦,希望对你有所帮助,让我们一起努力走向巅峰。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK