Hacker News new | ask | show | jobs
by riolu 1436 days ago
I cannot recommend brew for react development (NPM). Installing NPM packages through brew is not supported by projects that require global packages. NPM installed through brew frequently runs into issues by projects that expect packages via NPM to be in /usr/local but are not symlinked. This is not even mentioning all other flaws of brew, such as owning /opt or /usr/local to your user breaking multi user support, being based on git and subsequently very slow, brew breaking on even point releases of macOS.

I recently started a job that requires react and docker so here's what works for me. Install node.js from their website, use npm to install typescript language server globally, docker binaries like Minikube suggest using `sudo install minikube`, reading the manual for `install` says it simply copies the binary over to /usr/local/bin (already in path! security issue for brew owning this to your user??). You can then use `install` for any CLI tools you need (jq!).

macOS was never designed for package managers, brew does an exceptionally poor job at being a package manager while also fighting against macOS to stay functioning. I highly recommend avoiding brew, it is certainly not a necessity nor supported by packages it hosts.

1 comments

You don't install npm packages (or any language development packages) with brew. You install nvm with brew and go forward with it.