当前位置:网站首页>How to upgrade nodejs version
How to upgrade nodejs version
2022-07-31 08:29:00 【bsegebr】
How to upgrade nodejs version?
Here are three methods
Method 1: Upgrade nodejs with n (this method is recommended)
# View the current node version$ node -v# clear npm cache$ npm cache clean -f# global install n$ npm install -g n# Upgrade to the latest stable version$ n stable# Upgrade to the latest version$ n latest# Upgrade to custom version$n v14.6.0# switch version$ n 13.10.0 (ENTER)# delete the specified version$nrm 13.10.0# Execute the script with the specified version$ n use 13.10.0 some.js# After the upgrade is complete, check the node version$ node -v
Note:
If the n module is installed in the first step, an error is reported npm ERR! code EBADPLATFORM
If you encounter such an error message, first delete the generated node_modules folder, and then add --force after the command to re-run;
For example:npm install --force is enough;
If not, repeat the above steps.
Method 2: Use NVM to upgrade nodejs
github download nvm
Configure the project to environment variables
$ source ~/.bashrc$ nvm --version# Upgrade to custom version$ nvm install 13.10.0# Upgrade to the latest version$ nvm install lastest# Upgrade to stable version$ nvm install stable
Method 3: Download from the official website
Go to the official website to download the LTS version of node
and then install it
Learn more nodejs knowledge: "nodejs tutorial".
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- mysql insert new field method
- [PSQL] SQL Basic Course Reading Notes (Chapter1-4)
- [MySQL exercises] Chapter 4 · Explore operators in MySQL with kiko
- 初识NK-RTU980开发板
- 《c语言小游戏》入门级三子棋游戏(机器人加强版)
- torch分布式训练
- Machine Learning - Notes and Implementation of Linear Regression, Logistic Regression Problems
- 【小程序项目开发-- 京东商城】uni-app之商品列表页面 (上)
- Ubuntu22.04安装mysql
- MySQL中InnoDB的多版本并发控制(MVCC)的实现
猜你喜欢
随机推荐
NK - RTU980 burning bare-metal program
【云原生与5G】微服务加持5G核心网
控制文本保留几行,末尾省略
重装系统后,hosts文件配置后不生效
MySQL 5.7 安装教程(全步骤、保姆级教程)
全国中职网络安全B模块之国赛题远程代码执行渗透测试 PHPstudy的后门漏洞分析
Ceph单节点部署
CNN--Introduction to each layer
Jetpack Compose学习(8)——State及remeber
【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)
关于“算力”,这篇文章值得一看
Embedded system driver primary [2] - _ parameters and dependencies under the kernel module
[Interview: Concurrency 37: Multithreading: Thread Pool] Custom Thread Pool
深度理解递归,手撕经典递归问题(汉诺塔,青蛙跳台阶),保姆级教学。
[PSQL] Complex query
Vscode: Project-tree plugin
如何使用mysql binlog 恢复数据
Cloud server deployment web project
【小程序项目开发-- 京东商城】uni-app之商品列表页面 (上)
35-Jenkins-共享库应用