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

分布式缓存系统必须要解决的四大问题

Super detailed mysql database installation guide

MySQL detailed explanation

Read Elephant Swap in one article, why does it bring such a high premium to ePLATO?

TypeError The view function did not return a valid response. The function either returned None 的解决

【pytorch记录】pytorch的分布式 torch.distributed.launch 命令在做什么呢

@Transactional注解的失效场景

SQL 入门之第一讲——MySQL 8.0.29安装教程(windows 64位)

【MySQL功法】第4话 · 和kiko一起探索MySQL中的运算符

深度理解递归,手撕经典递归问题(汉诺塔,青蛙跳台阶),保姆级教学。
随机推荐
The Spark run on Yarn Spark application
Practical Bioinformatics 2: Multi-omics data integration and mining
关于yum源的配置及更新
SSM整合案例分析(详解)
MySql database optimization query tool
功能强大的国产Api管理工具
2022.07.22 _ a day
SQLAlchemy使用教程
【小程序项目开发--京东商城】uni-app之自定义搜索组件(上)-- 组件UI
vscode输出中文乱码问题
ros little turtle drawing
关于@Autowired
[PSQL] Complex query
UML图及在drawio中的绘制
Machine Learning - Notes and Implementation of Linear Regression, Logistic Regression Problems
Visual Studio新功能出炉:低优先级构建
SSM框架简单介绍
PHP中 比较 0、false、null,‘‘ “
[MySQL exercises] Chapter 2 Basic operations of databases and data tables
安装部署KubeSphere管理kubernetes