Skip to main content

Node

Install

brew install node@18

Then add

export PATH="$(brew --prefix)/opt/node@18/bin:$PATH"

export LDFLAGS="-L$(brew --prefix)/opt/node@18/lib"
export CPPFLAGS="-I$(brew --prefix)/opt/node@18/include"

to ~/.zshrc

You can do it by just copying and pasting the following commands into the terminal.

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

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