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.
##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!