The easiest way to update your Node.js on your Mac in 2020

The easiest way to update your Node.js on your Mac in 2020

Node.js Beginner Guide

Image for postillustration by Chaeyun Kim

Several new JavaScript libraries in the NPM require the latest Node.js version, so you should keep updating your Node.js. Let?s see the easiest way how to do it!

1. Open your console and check your Node.js version.

$ node -vv x.x.x

2. Install n package using npm if you do not have it installed yet.

$ sudo npm install -g n

3. Then, you can update your Node.js to the version you want.

(Use this command to install the stable node release.)$ sudo n stable(Use this command to install/update the latest node release.)$ sudo n latest(Use this command to install/update the latest LTS node release.)$ sudo n lts

4. That?s it! You can verify that the update is successful by checking your Node.js version again.

$ node -vv x.x.x

No Responses

Write a response