当前位置:网站首页>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
边栏推荐
猜你喜欢

How to use opcache, an optimization acceleration component of PHP

Switch basic experiment

双链表有关操作

【历史上的今天】7 月 1 日:分时系统之父诞生;支付宝推出条码支付;世界上第一支电视广告
![[datawhale202206] pytorch recommendation system: recall model DSSM & youtubednn](/img/f2/7931952b832e84d7b8f2615906f33f.png)
[datawhale202206] pytorch recommendation system: recall model DSSM & youtubednn

使用nvm管理nodejs(把高版本降级为低版本)

队列的链式存储

数论基础及其代码实现

Ikvm of toolbox Net project new progress

基于开源流批一体数据同步引擎 ChunJun 数据还原 —DDL 解析模块的实战分享
随机推荐
BIM and safety in road maintenance-buildSmart Spain
kubernetes之ingress探索实践
QT 播放器之列表[通俗易懂]
队列的链式存储
Like the three foot platform
[Suanli network] technological innovation of Suanli Network -- key technology of operation service
"Analysis of 43 cases of MATLAB neural network": Chapter 40 research on prediction of dynamic neural network time series -- implementation of NARX based on MATLAB
ROS2 Foxy depthai_ros教程
6.30 simulation summary
localtime居然不可重入,踩坑了
【历史上的今天】7 月 1 日:分时系统之父诞生;支付宝推出条码支付;世界上第一支电视广告
JS related interview questions and answers (1)
redis探索之缓存击穿、缓存雪崩、缓存穿透
工具箱之 IKVM.NET 项目新进展
leetcode:226. 翻转二叉树【dfs翻转】
系统测试UI测试总结与问题(面试)
(mixed version 1) multiple TXT text to one table
Ansible的playbook
Question d'entrevue de Huawei: recrutement
本科毕业四年:工作,辞职,结婚,买房