当前位置:网站首页>利用nvm动态调整nodejs版本,解决因为node版本过高或过低导致项目无法运行和打包
利用nvm动态调整nodejs版本,解决因为node版本过高或过低导致项目无法运行和打包
2022-06-12 08:43:00 【爱上_下划线】
下载
卸载nodejs
如果以前装过nodejs需要先卸载,没有装过的话跳过这一步
打开cmd,输入where node,得到安装路径,然后将文件夹全部删除
安装nvm
将下载的nvm.exe 文件安装,直接下一步下一步即可,安装位置可以自己决定,路径上不能有中文,空格
检查安装结果
cmd界面,运行nvm v,出现如下界面即安装成功
查看所有可加载的nodejs 版本
cmd界面,运行 nvm list available
加载任意一个版本
cmd界面,运行 nvm install 14.19.0,代表加载14.19.0版本
查看所有加载的版本
cmd界面,运行 nvm ls
启用指定的版本
cmd界面,运行 nvm use 14.15.0,代表本地安装nodejs-14.15.0,版本
查看本地的node版本是否安装成功
cmd界面,运行node -v和npm -v,检验node.js以及对应npm是否安装成功
之后可以使用nvm use + 版本,随时切换nodejs的版本
如果node安装成功npm安装失败
卸载当前版本,再重装一下就可以了,可能是网络不好,没有下载成功
cmd界面,运行 nvm uninstall + 版本 卸载
或者这篇文章对您或许有帮助
边栏推荐
- 记Date类型的一次踩坑
- Dynamic segment tree leetcode six hundred and ninety-nine
- MES helps enterprises to transform intelligently and improve the transparency of enterprise production
- svg中viewbox图解分析
- Callback webrtc underlying logs to the application layer
- Encapsulate the amount input box component.
- Knee joint
- 《MATLAB 神经网络43个案例分析》:第8章 GRNN网络的预测----基于广义回归神经网络的货运量预测
- Record the first step pit of date type
- 【 pointeur avancé Ⅲ】 mise en œuvre de la fonction de tri rapide qsort& fonction de rappel en langage C
猜你喜欢

Union selector

Background position position NOUN

Webrtc series - mobile terminal hardware coding supports simulcast

Background color translucent

Database foundation -- normalization and relational schema

The Three Kingdoms kill the surrounding areas -------- explanation of the pig Kingdom kill problem

What is the quality traceability function of MES system pursuing?

Background location case 1

Handling abnormal data

Centso8 installing mysql8.0 (Part 2)
随机推荐
Arrays in JS
JVM学习笔记:三 本地方法接口、执行引擎
API handling Android security distance
Engineers learn music theory (III) interval mode and chord
深拷贝与浅拷贝的区别
Box model border
MPLS的原理与配置
了结非对称密钥
Database foundation -- normalization and relational schema
JS to refresh the page after loading
Error: ER_ NOT_ SUPPORTED_ AUTH_ MODE: Client does not support authentication protocol requested ... ...
What scheduling rules does the APS software have? What is the exception handling scheme?
Never use MES as a tool, or you will miss the most important thing
【动态内存管理】malloc&calloc和realloc和笔试题和柔性数组
第七章-更灵活定位内存地址
Vscade debug TS
第八章-数据处理的两个基本问题
The electrical fire detector monitors each power circuit in real time
This article is required for the popularization of super complete MES system knowledge
Centso8 installing mysql8.0 (Part 2)