Search code examples
node.jsmacosnpmnvmmacos-ventura

Installing Node with NVM on MacOS Ventura?


I followed these steps to install Node and NPM with NVM on MacOS Ventura and it worked fine.

If I try to rerun the install it tells me this:

oleersoy@Oles-MacBook-Pro fs-developer-md % nvm install node
v19.8.1 is already installed.
Now using node v19.8.1 (npm v9.5.1)

However if I open a new terminal neither the npm nor the node commands are available.

How do we make them available to all terminal windows? The last time I did this install it was automatic ...


Solution

  • Add these line to your ~/.zshrc.

    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
    [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
    

    And then restart your terminal or type below command in you terminal.

    source $HOME/.zshrc
    

    And do not follow any random guide, always go to official docs.