Downgrade and Install Node Spesific Version on macOS
A few days ago, i want to build a frontend project that my friend has made, the project is built using vue, when installing dependencies or packages needed, the installation process stops because there are packages that cannot be installed. At that time, I used node version 13.
Does the node version in the development environment need to be upgraded? I don’t think that’s the right solution because it might require so much effort.
So what’s the solution? Node version on my MacBook that needs to be downgraded.
How do you downgrade a node version on macOS?
- Check available node version.
$ brew search node
- Unlink current node version.
$ brew unlink node
- Install node based on the version that will be used. At present, i want to use node version 10.
$ brew install node@10
- Link it to installed version.
$ brew link --force --overwrite node@10
- Verify node version, make sure node was downgraded successfully.
$ node -v
Note: After you downgrade the node version, you need to delete the node_modules directory in another project if you have several projects that use nodes on your device.