当前位置:网站首页>利用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 + 版本 卸载
或者这篇文章对您或许有帮助
边栏推荐
- Difference between binary GB and gib
- 第五章-[bx]和Loop指令
- Shell basic syntax -- arithmetic operation
- Error: clear the history in the search box in the website?
- Jump to an interface at a specified time. (Web Development)
- 根据有效期显示距离当前还剩多少天有效期
- 【新规划】
- Py & go programming skills: logic control to avoid if else
- (p17-p18) define the basic type and function pointer alias by using, and define the alias for the template by using and typedef
- You have an error in your SQL syntax; use near ‘and title=‘xxx‘‘ at line 5
猜你喜欢
![[essence] explain in detail the memory management mechanism in QT](/img/7d/0d83158c6b0574dd3b3547b47af67e.jpg)
[essence] explain in detail the memory management mechanism in QT

Background location case 1

What is the MES system? What is the operation process of MES system?

第八章-数据处理的两个基本问题

(p21-p24) unified data initialization method: List initialization, initializing objects of non aggregate type with initialization list, initializer_ Use of Lisy template class

Error: what if the folder cannot be deleted when it is opened in another program

Centso8 installing mysql8.0 (Part 2)

How to understand the production scheduling of APS system?

Website colab and kaggle

Regular expressions in JS
随机推荐
第四章-第一个程序
Background position position NOUN
Get last month, current time and next month
Display the remaining valid days according to the valid period
Webrtc adding third-party libraries
ctfshow web4
Why should enterprises implement MES? What are the specific operating procedures?
Dynamic segment tree leetcode six hundred and ninety-nine
Jump to an interface at a specified time. (Web Development)
UMI packaging and subcontracting, and compressing to gzip
js实现页面加载后再刷新一次
Convert spaces to < br / > newline labels
了结非对称密钥
This article is required for the popularization of super complete MES system knowledge
Oracle installation details (verification)
Engineers learn music theory (I) try to understand music
Method to limit the input box to only numbers
What should be paid attention to when establishing MES system? What benefits can it bring to the enterprise?
(P14) use of the override keyword
svg中viewbox图解分析