Downgrade Node on MacBook

Viewed 7585

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 node@14.17.1  

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)?

1 Answers

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.

Related