当前位置:网站首页>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
边栏推荐
猜你喜欢
![[encounter Django] - (II) database configuration](/img/13/9512c1e03349092874055771c3433d.png)
[encounter Django] - (II) database configuration

Operations related to sequence table

Chapter 14 signals (IV) - examples of multi process tasks

leetcode:241. 为运算表达式设计优先级【dfs + eval】

基因检测,如何帮助患者对抗疾病?

队列的链式存储
![[JS] interview questions](/img/f3/8cf430b999980190a250f89537715e.jpg)
[JS] interview questions

Mobile note application

基于.NetCore开发博客项目 StarBlog - (13) 加入友情链接功能
![[datawhale202206] pytorch recommendation system: recall model DSSM & youtubednn](/img/f2/7931952b832e84d7b8f2615906f33f.png)
[datawhale202206] pytorch recommendation system: recall model DSSM & youtubednn
随机推荐
【MAUI】为 Label、Image 等控件添加点击事件
被锡膏坑了一把
Chain storage of binary tree
I wish you all a happy reunion
6.30 simulation summary
BIM and safety in road maintenance-buildSmart Spain
System test UI test summary and questions (interview)
[JS] interview questions
MySQL的零拷贝技术
Wechat simulated geographical location_ Camouflage wechat location
79. 单词搜索【dfs + 回溯visit + 遍历起点】
"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
codeforces -- 4B. Before an Exam
腾讯黎巍:深耕“监管科技”,护航数字经济行稳致远
ROS2 Foxy depthai_ros教程
单点登录SSO与JWT好文整理
使用BurpSuite对app抓包教程
leetcode:329. 矩阵中的最长递增路径【dfs + cache + 无需回溯 + 优雅】
Arm GIC (V) how arm TrustZone supports security interrupt analysis notes.
Accept different views with an open mind