DanDev
DanDev

Reputation: 39

Downgrade Node on MacBook

I installed the latest version of Node on their website, but I had issues with png and segmentation errors and such, looked it up and saw that it is a common issue on version 16. So I decided to downgrade to the stable version (14), which I have been unable to do. I've tried

npm install -g [email protected]  

After running this and doing node -v, it still shows the latest version (16). How can I uninstall version 16 and only be on the stable version (14)?

Upvotes: 3

Views: 13791

Answers (2)

Ming
Ming

Reputation: 121

Find out where is the current node and delete

where node

Install nvm

For macOS

Show all the versions

nvm ls available

Install what you want

nvm install 14.17.1
nvm use 14.17.1

Check node version

node -v

Upvotes: 2

Kiran Maniya
Kiran Maniya

Reputation: 8979

The best way is to use nvm Here, you can get brief details on how to use nvm. nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: Unix, macOS, and windows WSL.

The best thing is, you can run multiple versions of node at the same time on a different shell, It's like version manager on steroids. Please check this also n package.

Upvotes: 3

Related Questions