Answers for "installing node using nvm"


use nvm to install latest node

//lists all versions
nvm ls-remote

//installs the version you want (in this case version 14.0.0)
nvm install v14.0.0

//use the version that you installed as the default
nvm use v14.0.0
Posted by: Guest on July-04-2020

how to install nvm in mac

$ curl -o- | bash
Posted by: Guest on June-04-2020

install node using nvm windows

First install NVM - -2.nd answer
nvm install latest
nvm use 15.4.0 [instead of 15.4.0 use whatever number cmd spills on you]
Posted by: Guest on December-17-2020

install nvm

curl -o- | bash
Posted by: Guest on August-13-2021

install node in nvm

// Ex:
nvm install v12.13.1
Posted by: Guest on April-22-2020

how to reinstall node nvm

Apparently, there was a /Users/myusername/local folder that contained a include with node and lib with node and node_modules. How and why this was created instead of in my /usr/local folder, I do not know.

Deleting these local references fixed the phantom v0.6.1-pre. If anyone has an explanation, I'll choose that as the correct answer.


You may need to do the additional instructions as well:

sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}

which is the equivalent of (same as above)...

sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp 

or (same as above) broken down...

To completely uninstall node + npm is to do the following:

go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory 
if you installed with brew install node, then run brew uninstall node in your terminal
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable

You may also need to do:

sudo rm -rf /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node.1 /usr/local/lib/dtrace/node.d

Additionally, NVM modifies the PATH variable in $HOME/.bashrc, which must be reverted manually.

Then download nvm and follow the instructions to install node. The latest versions of node come with npm, I believe, but you can also reinstall that as well.
Posted by: Guest on December-29-2020

Browse Popular Code Answers by Language