当前位置:网站首页>Manage nodejs with NVM (downgrade the high version to the low version)
Manage nodejs with NVM (downgrade the high version to the low version)
2022-07-01 12:38:00 【Yunlord】
Preface
Just beginning to learn springboot+vue frame , The most troublesome thing is to configure the environment , Especially the problem of different versions of templates online and offline .
To solve this problem , Today, we mainly introduce the front end vue Environment configuration of , We go through nvm Manage different versions of node, Achieve seamless connection .
One 、nvm、npm、node Introduce
1. difference
- nvm:nodejs Version management tools , in other words : One nvm Can manage a lot of node Version and npm edition .
- nodejs: Code base needed in project development .
- npm:nodejs Package management tools , Installed nodejs When ,npm It will also be installed with , It is a package management tool ,npm management nodejs Third party plug-ins in .
2. Relationship
nvmmanagementnodejsandnpmVersion of ,npmCan managenodejsThird party plug-ins for .

Two 、nvm Installation steps
1. Before uninstalling node
Go to the control panel , Open uninstall or change program , Search for node.js, Find the installed node.js And uninstall .
2. download nvm Management tools
Download the installation package from the official website https://github.com/coreybutler/nvm-windows/releases, Download the one in the red box .

3. function nvm-setup.exe file
(1) choice “ I accept …” That line , Click on next
(2) You can customize and select the path disk according to your own situation , There should be no spaces or Chinese symbols in the path
(3) choice node.js Installation position of , You can customize and select the path disk according to your own situation , There should be no spaces or Chinese symbols in the path
(4) The last step , Click on install Installation is complete
4. Verify successful installation
nvm vIf version number appears , Successful installation ( If the installation is not successful , Check the previously installed node.js Has it been completely deleted 、 install nvm Is there anything missing in the process !).
5. Add image
After installation , We also need to add Taobao image in the setting file , So we can choose to download nodejs There are many versions to choose from and the download speed is fast
stay nvm Found under the installation path of setting.txt file 、 Open editor .
stay setting.txt Added to the document :
node_mirror: https://npm.taobao.org/mirrors/node/
npm_mirror: https://npm.taobao.org/mirrors/npm/3、 ... and 、 install node.js edition
1. View available node.js Version number
nvm list available2. Install different versions of node
nvm install 14 stay nvm install You can download it directly by adding the version number you want to install ,( for example :nvm install 14) You can install the corresponding version and automatically install the corresponding version npm edition .
3. Switch node edition
nvm use 14After successful installation , Enter the command line nvm use node Version number ( for example :nvm use 14) You can choose what you use locally Node.js edition , Use this command line to switch freely according to your own needs node.js Version run .
Bear in mind : Be sure to enter this command when installing for the first time , Can be used node.
4. see node and npm Version number
node -v
npm -v
Reference resources :
nvm Installation and use ( The detailed steps )_ Caltex's blog -CSDN Blog _nvm install
边栏推荐
- AI抠图工具
- IOS interview
- ASTM D 3801固体塑料垂直燃烧试验
- codeforces -- 4B. Before an Exam
- localtime居然不可重入,踩坑了
- First intention is the most important
- 运行Powershell脚本提示“因为在此系统上禁止运行脚本”解决办法
- [Maui] add click events for label, image and other controls
- 工具箱之 IKVM.NET 项目新进展
- How to use opcache, an optimization acceleration component of PHP
猜你喜欢
随机推荐
GID: open vision proposes a comprehensive detection model knowledge distillation | CVPR 2021
Circular linked list--
Ansi/ul 94 VTM vertical burning test for thin materials
顺序表有关操作
Good luck brought by years of persistence
R语言基于h2o包构建二分类模型:使用h2o.gbm构建梯度提升机模型GBM、使用h2o.auc计算模型的AUC值
基于.NetCore开发博客项目 StarBlog - (13) 加入友情链接功能
AI matting tool
華為面試題: 招聘
6.30模拟赛总结
ASP. Net core 6 from entry to enterprise level practical development application technology summary
Compile and debug net6 source code
编译调试Net6源码
数字信号处理——线性相位型(Ⅱ、Ⅳ型)FIR滤波器设计(2)
Arm GIC (V) how arm TrustZone supports security interrupt analysis notes.
Wechat applet - 80 practical examples of wechat applet projects
List of QT players [easy to understand]
kubernetes之ingress探索实践
Digital signal processing -- Design of linear phase (Ⅱ, Ⅳ) FIR filter (2)
Switch basic experiment








