how can i install nvm when I get the below error during installation

44 views Asked by At

When i try to install nvm i receive error like this:

nvm install 18.12.1 -bash: cannot create temp file for here-document: No such file or directory -bash: cannot create temp file for here-document: No such file or directory Version '18.12.1' not found - try nvm ls-remote to browse available versions.

after this bash, installation has stopped

Someone know what can I do to resolve this problem?? many thx for any answers and suggestions.

1

There are 1 answers

0
felipezarco On

To install node with nvm:

Clone nvm repo:

git clone https://github.com/nvm-sh/nvm.git ~/.nvm

Add the below line to the end of your script file ~/.bashrc (if you use bash) or ~/.zshrc (if you use zsh):

source ~/.nvm/nvm.sh

Then run:

source ~/.zshrc
sudo snap remove curl # This is just to ensure cURL is updated 
sudo apt install curl
nvm install node