lomine
lomine

Reputation: 1181

Trying to install nvm

I'm trying to install nvm but keep getting errors.

I run the install script

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

and I get

=> nvm is already installed in /Users/xxxxx/.nvm, trying to update using git
=> => Compressing and cleaning up git repository

=> nvm source string already in /Users/xxxxx/.bash_profile
=> bash_completion source string already in /Users/xxxxx/.bash_profile
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:

/Users/xxxxx/.nvm/versions/node/v10.17.0/lib
└── [email protected]
=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:

     $ nvm use system
     $ npm uninstall -g a_module

=> Close and reopen your terminal to start using nvm or run the following to use it now:

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

If I close and open a new terminal window and check for nvm with nvm -v

I get

zsh: command not found: nvm

Upvotes: 4

Views: 2384

Answers (1)

vikramvi
vikramvi

Reputation: 3635

Mac OS Fix

export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh

After this close terminal and open it again.

Voila it should work like charm

Upvotes: 1

Related Questions