当前位置:网站首页>Common methods of nodejs version upgrade or switching
Common methods of nodejs version upgrade or switching
2022-07-25 10:09:00 【A cabbage~】
List of articles
node Common methods of version upgrade
1. Download and install on the official website nodejs package ( Not recommended )
most lou Is to delete the computer nodejs package , Then download again .
# Not recommended #: nodejs Package deletion is not clean, which may cause other problems
2.nvm install (win recommend )
nvm Don't download it , Go to Baidu by yourself , Just install the next one
cmd Command line nvm -v Just check whether it is installed
After installation , Find the path to install , open
setting.txtnode_mirror: https://npm.taobao.org/mirrors/node/ npm_mirror: https://npm.taobao.org/mirrors/npm/Configure Taobao image path , Otherwise, it defaults from github Download from foreign servers , It will be slow , Bad network may cause packet loss
nvm Common commands
nvm off // Ban node.js version management ( Don't unload anything )
nvm on // Enable node.js version management
nvm install <version> // install node.js The name of version It's the version number for example :nvm install 8.12.0
nvm uninstall <version> // uninstall node.js Yes, orders , Uninstall the specified version of nodejs, When the installation fails, uninstall and use
nvm ls // Displays all installed node.js edition
nvm list available // Displays all that can be installed node.js Version of
nvm use <version> // Switch to use the specified nodejs edition
nvm v // Show nvm edition
nvm install stable // Install the latest stable version
Remember after installation nvm use node The version number is to switch to the corresponding version nodejs 了
3.n Module installation (Linux recommend )
node Of n The module is node Dedicated to the management of node Version of the module , Can be done node Version switching 、 download 、 install .
n install (npm、cnpm、yarn、pnpm Whichever you like )
// windows Environmental Science npm install -g n // mac Environmental Science sudo npm install -g n
npm install -g n There may be a mistake . Use :npm install -g n --force that will do
n Common commands
n --version // see n Version of the module
n // Show all downloaded node edition
n latest // Upgrade to the latest node edition
n stable // Upgrade to the latest stable node edition
n rm <version> // Delete specified node edition
n <version> // Use the corresponding node edition
n Module mismatch windows System , therefore win It is not recommended if there is no other system installed , Let's see what I like , If you insist on using it, install Linux Well .
边栏推荐
- Probabilistic robot learning notes Chapter 2
- Common methods of JS digital thousand bit segmentation
- Advanced introduction to digital IC Design SOC
- CCF 201503-3 Festival
- [tensorflow2 installation] tensorflow2.3-cpu installation pit avoidance guide!!!
- 小程序分享功能
- 概率机器人学习笔记第二章
- js数字千位分割的常用方法
- 【建议收藏】靠着这些学习方法,我入职了世界五百强——互联网时代的“奇技淫巧”
- CCF 201512-4 delivery
猜你喜欢

车辆属性最近一次入库时间初始化生成sql脚本文件

JS uses requestanimationframe to detect the FPS frame rate of the current animation in real time
![严重 [main] org.apache.catalina.util.LifecycleBase.handleSubClassException 初始化组件](/img/39/6f6760e80acec0b02028ea2ed1a5b1.png)
严重 [main] org.apache.catalina.util.LifecycleBase.handleSubClassException 初始化组件

MLX90640 红外热成像仪测温模块开发笔记(五)

Download and installation of QT 6.2

数据库MySQL详解

Terminal definition and wiring of bsp3 power monitor (power monitor)

小程序企业发放红包功能

~3 CCF 2022-03-2 travel plan

Probabilistic robot learning notes Chapter 2
随机推荐
Exciting method and voltage of vibrating wire sensor by hand-held vibrating wire acquisition instrument
SOC芯片内部结构
ROS distributed operation -- launch file starts nodes on multiple machines
Solve the problem that esp8266 cannot connect mobile phones and computer hotspots
VCs common commands
Store to-do items locally (improve on to-do items)
JS uses requestanimationframe to detect the FPS frame rate of the current animation in real time
ADC introduction
OC -- packaging class and processing object
Debug篇快捷键入门
Visualization of sensor data based on raspberry pie 4B
Solve the Chinese garbled code error of qtcreator compiling with vs
JDBC总结
An ASP code that can return to the previous page and automatically refresh the page
The economic basis of a hardware siege lion
CCF 201509-4 Expressway
无线振弦采集仪应用工程安全监测
NPM详解
mysql历史数据补充新数据
小程序H5获取手机号方案

