I did install nvm regarding the documentation, then installed the latest LTS node, nvm install 12.16.1 and globally installed yarn.

everything was working well, the node -v and npm -v and which node were showing what they should.

I did create a react-native app and the metro bundler had a problem finding node. The solution was to make a symlink(ln -s $(which node) /usr/local/bin/node).

Since then, nvm, npm, yarn commands are not found by the terminal (zsh).

I could not find a proper way to install node via nvm where all programs and shells can have access to it. Without needing symbolic links or so.

This is the script added to .bash_profile after installing nvm

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

[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

You must log in to answer this question.

Browse other questions tagged .