
Homebrew is the de facto standard package manager for macOS.
Homebrew installation will take some time, but it's worth it. To feel safer, you can copy the command from the official Homebrew website. If you're concerned that I'm trying to hack you with an unknown script from the internet, you're concerned correctly, but I'm not trying to steal your crypto wallet.
If you don't have Homebrew, paste this to your terminal: /bin/bash -c "$(curl -fsSL )" Open terminal and paste this command: brew -vĭid it print Homebrew and some numbers? Great! That means you have Homebrew. So, how to do that? Check or install Homebrew
Install Homebrew, if you don't already have it. Well, it's already been around for years, but now, after a year of using it, I feel confident to recommend it over nvm. And no, I'm not talking about nvm, which has been my go-to manager for years of development, but lately it was slowing the startup of new terminals so much that I just could not bear it. But how to install Node.js properly, you ask? Using a node version manager. Please, avoid those horrible time sinks and install Node.js properly. Installing with the official Node.js installer will also prevent you from easily switching between Node.js versions, which is something that you don't need until you do, and then it makes you cry, because uninstalling Node.js is a whole different beast. Yes, it's fixable even with the official installer, but if you already know that, why are you reading a tutorial on Node.js installation? 😅 So you will either run your commands with sudo, which is a security concern, or you'll tear out your hair trying to fix permission errors. There's nothing wrong with the official installer, but it will give you a headache later on, trust me.įirst of all, it installs Node.js in a way that installation (and potentially usage) of global Node.js packages will require admin rights. Okay, so there's about a zillion guides on how to install Node.js on the internet, but most of them show you how to install Node.js using the official installer.