← Back to FAQs

How do I install Node.js on macOS?

Use Homebrew (recommended): brew install node@22. Alternatively, use nvm for version management: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash then nvm install 22. You can also download the installer directly from nodejs.org. After installation, verify with node --version to ensure you have version 20 or higher.

installationnodejsmacoshomebrew

Use Homebrew (recommended): brew install node@22. Alternatively, use nvm for version management: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash then nvm install 22. You can also download the installer directly from nodejs.org. After installation, verify with node --version to ensure you have version 20 or higher.