当前位置:网站首页>Node version manager NVM installation and switching
Node version manager NVM installation and switching
2022-07-01 11:00:00 【wade3po】
These two years , As long as the latest stable version is installed node, Generally, the version is too low . However , I encountered a version that was too high , Dependency installation failed 、 Dependent version syntax is incompatible . What can I do? , Only the version can be changed .
First installation node,npm The version is the same as node Versions are bound together , Then overwrite node,npm Will not follow the update , Need to update manually npm Up to date :
npm install -g npm
You can also update to the specified version :
npm -g install [email protected]
install node By the specified version, there are many methods , The simplest is to install the overlay , Have not tried to use third-party uninstall node What will happen if you install it again , Direct coverage is possible , You can go to node Find the specified version on the official website :
https://registry.npmmirror.com/binary.html?path=node/latest-v12.x/
Which version do you want to put the address v12 Just change it to the version you want , find x64.msi(windows 64) Download directly double-click to install overlay .
node Some package managers are also given :
tips: Many online users n Manager's , The description seen here is :n It is a simple and easy-to-use one suitable for Mac and Linux Of Node.js Version Manager . therefore windows There is no need to try again .
Recommended here nvm To manage node edition , It's really convenient and quick to use .
download nvm-setup.exe( Other environments are not found ,GitHub Using scripts , I don't know if I can make it ):
https://github.com/coreybutler/nvm-windows/releases
Double click installation :
nvm Installed directory
Downloaded versions node Catalog , The first installation is the direct default , This directory will be assigned to the original download node, When switching versions, it will overwrite . My colleague tried , Need to follow the original node The same directory , After the installation is completed, the original can be deleted to switch successfully .
Take a look after the installation nvm -version Take a look at the version , If you have it, the installation is successful .
tips: Prompt after successful installation , Never tried to choose No , Guess if you choose no, the originally installed version will not be affected nvm control .
- nvm install 16.15.1: Install the corresponding node edition
- nvm uninstall 16.15.1: Uninstall the corresponding node edition
- nvm list: View the installed node edition
- nvm use 16.15.1: Use the corresponding node edition
After installation , View version , There is no reference to the identification of which version :
Switching versions will cause errors :
exit status 5: �ܾ����ʡ�
exit status 1: ���ļ��Ѵ���ʱ�����������ļ���
Delete the originally installed node Switch again , You will also report mistakes. :
exit status 1: �ܾ����
After deletion, run as administrator cmd Operate again and you will succeed ( Download and install without ):
tips: Someone said it was nvm Under the table of contents settings.txt Plus, it will be faster :
node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/
Tried it on , Not much feeling , If it's really slow, you can try , Otherwise, it's not necessary .
One thing to say , After the colleague installed , use husky The verification broke , Can't find node, It's also strange , It didn't work out in the end , The computer has changed .
Welcome to the official account coding Personal notes
边栏推荐
- Export and import of incluxdb on WIN platform
- Oracle和JSON的結合
- . Net 5.0+ does not need to rely on third-party native implementation of scheduled tasks
- Oracle和JSON的结合
- 放弃深圳高薪工作回老家
- 转义字符串
- Applymiddleware principle
- Half of 2022 has passed, isn't it sudden?
- Project0:小游戏
- flutter path_ Provider: ^2.0.10 can get temporary directory
猜你喜欢
Sqlachemy common operations
投稿开奖丨轻量应用服务器征文活动(5月)奖励公布
How does MySQL copy table data from one database to another (two databases are not linked to the same database)
华为设备配置大型网络WLAN基本业务
bash: ln: command not found
How to solve the problem of SQL?
Suggest collecting | what to do when encountering slow SQL on opengauss?
NC | 肠道细胞和乳酸菌共同作用来防止念珠菌感染
《数据安全法》出台一周年,看哪四大变化来袭?
JS基础--数据类型
随机推荐
使用强大的DBPack处理分布式事务(PHP使用教程)
PHP有哪些优势和劣势
Huawei HMS core joins hands with hypergraph to inject new momentum into 3D GIS
. Net 5.0+ does not need to rely on third-party native implementation of scheduled tasks
Neurips 2022 | cell image segmentation competition officially launched!
CRC verification
[.NET6]使用ML.NET+ONNX预训练模型整活B站经典《华强买瓜》
Combination of Oracle and JSON
bash: ln: command not found
Database experiment report (I)
YoDA统一数据应用——融合计算在蚂蚁风险场景下的探索与实践
移动硬盘驱动器读到,但不显示盘符
Project0: Games
Prism journal navigation button usability exploration record
[.NET6]使用ML.NET+ONNX预训练模型整活B站经典《华强买瓜》
内存泄漏定位工具之 valgrind 使用
Huawei equipment is configured with large network WLAN basic services
NC | 肠道细胞和乳酸菌共同作用来防止念珠菌感染
谷歌新论文-Minerva:用语言模型解决定量推理问题
技术分享 | Linkis参数介绍