当前位置:网站首页>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 .
边栏推荐
- Terminal definition and wiring of bsp3 power monitor (power monitor)
- Introduction to armv8 architecture
- Mlx90640 infrared thermal imager temperature measurement module development notes (4)
- Connection and data reading of hand-held vibrating wire vh501tc collector sensor
- 用ESP32+TM1638实验NTP网络校时闹钟的ARDUINO代码
- SystemVerilog语法
- First knowledge of opencv4.x ---- mean filtering
- nodejs链接mysql报错:ER_NOT_SUPPORTED_AUTH_MODEError: ER_NOT_SUPPORTED_AUTH_MODE
- 【成长必备】我为什么推荐你写博客?愿你多年以后成为你想成为的样子。
- 安装 oh my zsh
猜你喜欢
随机推荐
NLM5系列无线振弦传感采集仪的工作模式及休眠模式下状态
The economic basis of a hardware siege lion
Introduction to arm GIC
JS uses requestanimationframe to detect the FPS frame rate of the current animation in real time
[tensorflow2 installation] tensorflow2.3-cpu installation pit avoidance guide!!!
VScode配置ROS开发环境:修改代码不生效问题原因及解决方法
See how a junior student of double non-2 (0 Internship) can get an offer from Alibaba and Tencent
Download and installation of QT 6.2
Arm preliminaries
LOAM 融合 IMU 细节之 TransformToEnd 函数
无线振弦采集仪应用工程安全监测
Mlx90640 infrared thermal imager temperature measurement module development instructions
Reflection 反射
ROS分布式操作--launch文件启动多个机器上的节点
ISP图像信号处理
framework打包合并脚本
小程序H5获取手机号方案
emmet语法速查 syntax基本语法部分
Mlx90640 infrared thermal imager temperature measurement module development notes (I)
ADC introduction










