当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
【pytorch记录】pytorch的分布式 torch.distributed.launch 命令在做什么呢
【小程序项目开发--京东商城】uni-app之自定义搜索组件(上)-- 组件UI
《opencv学习笔记》-- 仿射变换
7/28-7/29 期望+思维+后缀数组+ST表
【C#】判断字符串中是否包含指定字符或字符串(Contains/IndexOf)
2022.07.22 _ a day
关于“算力”,这篇文章值得一看
《如何戒掉坏习惯》读书笔记
Embedded system driver primary [2] - _ parameters and dependencies under the kernel module
重装系统后,hosts文件配置后不生效
vscode输出中文乱码问题
进程和线程的区别&&run和start区别与联系
Collation and sharing of related classic papers and datasets in the field of deep learning communication
个人报错问题 持续总结
"C language game" entry-level chess game (robot enhanced version)
"C language" frog jumping steps recursion problem
实用生物信息学2:多组学数据整合和挖掘
Ubuntu22.04安装mysql
一文读懂Elephant Swap,为何为ePLATO带来如此高的溢价?
【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)









