Ive been developing for a little over a year now, and the dev environment has been a nightmare, which causes me to do a clean MacOS reinstall every few months. The reason is that there are always a ton of clashes and errors when working with NPM, Yarn, Brew packages. Sometimes, a specific thing isnt working correctly, and then stackoverflow suggests a fix involving tampering with Mac files (bash_profile, profile, etc), changing $PATH, uninstalling Node manually, and reinstalling with brew without NPM, etc. Its a disaster. After a while of this, things just dont work.
I was suggested Docker as a solution (so I can have a separate environments for developing, and not have 3 different Nodes installed in separate paths), but this would only work if Docker would remove my need to install things globally on my Mac system. Is that how Docker works, or do I still need to install things to my Mac file system? Ideally, I would have one isolated environment for React Native work, a separate one for React JS, a separate one for Electron, etc, where for each, I do the entire command line setup (ie install a separate node, a separate NPM etc). Is this how it works?