Upgrade your Node to the latest version on Mac 2022
I often use Mac computer when I travel so I need to maintain an updated version of development tools e.g., Node.js.
Here’s a simple way of upgrading your node to the latest stable version.
- Open your console to check your current node version.
- $ node -v
- v x.x.x
- Install n package using npm
- sudo npm install -g n
- Update your node.js using stable version
- sudo n stable
- After that, check your node.js version again to see the latest version.
- $ node -v
- v x.x.x
That’s it.