/    Sign up×
Bounties /Pin to ProfileBookmark

What is the preferred method for upgrading Node.js on Mac OS?

I’d like to learn this the “old-fashioned” way without use of Brew or NVM. What is best practice in 2022 for upgrading Node.js?

to post a answer
JavaScript

3 Replies

Copy linkTweet thisAlerts:
@thrithedawgAug 14.2022 — sudo n latest
@buildinteractiveauthorTo clarify: this is assuming I have already installed the following, correct? npm install -g nAug 19.2022
Copy linkTweet thisAlerts:
@lashieAug 11.2022 — Using N: An npm-based node version manager.

 Check the Node.js version in your console.

If n package is not already installed, install it using npm.

 sudo npm install -g n 

(To install the stable node release, use this command.)
sudo n stable 

(To install/update the most recent node release, use this command.)
Sudo n latest

Install/update the most recent LTS node release with this command.
sudo n lts


done now! Checking your Node.js version once more will allow you to confirm the update was successful.
@buildinteractiveauthorThank you. How does N compare to NVM and is it possible to not use either?Aug 19.2022
Copy linkTweet thisAlerts:
@smpnjnAug 07.2022 — I wrote an article on this, actually, here: Change Node.js version
×

Success!

Help @buildinteractive spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...