nvm
must be installed on your system- you should have a
.nvmrc
file in root folder of the project - install manually the version of Node referred in
.nvmrc
withnvm install
in ~/.bashrc
find lines with:
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
change it to:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
if [ -f ".nvmrc" ]; then
nvm use > /dev/null
else
nvm use default > /dev/null
fi
In project folder add file .nvmrc
Example of .nvmrc
file:
v16.14.2