Skip to main content

Node

Install

The current long-term support (LTS) version is 24.

brew install node@24

Then copy and paste the following commands into the terminal to set up the node for zsh.

{ echo $PATH | grep -q "$(brew --prefix)/opt/node@24/bin" ; } || echo 'export PATH="$(brew --prefix)/opt/node@24/bin:$PATH"

export LDFLAGS="-L$(brew --prefix)/opt/node@24/lib"
export CPPFLAGS="-I$(brew --prefix)/opt/node@24/include"
' >> $HOME/.zshrc

and also run the following command to create a symbolic link.

ln -s $(brew --prefix)/opt/node@24/bin/node $(brew --prefix)/bin/node