Home  >  Article  >  Web Front-end  >  How to upgrade Node version

How to upgrade Node version

php中世界最好的语言
php中世界最好的语言Original
2018-05-29 10:35:311800browse

This time I will show you how to operate the upgraded version of Node, and what are the precautions when operating the upgraded version of Node. The following is a practical case, let's take a look.

Mac environment

##The first step, Check first Native node.js version:

$ node -v

The second step, Clear node.js cache:

$ sudo npm cache clean -f

The third step, Install n tool, this tool is specially used to manage node.js version, don’t doubt the name of this tool, it is him That's him, his name is "n"

$ sudo npm install -g n

The fourth step,Install the latest version of node.js

$ sudo n stable

The fifth step, Check the local node.js version again:

$ node -v

As shown

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to deal with Mac installation thrift error due to bison

How to use ES6 template string

The above is the detailed content of How to upgrade Node version. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn