Closed
Description
Running terminal in Mac OS X Yosemite.
Followed the installation instructions and restarted terminal:
curl https://raw.githubusercontent.com/creationix/nvm/v0.18.0/install.sh | bash
When using nvm I always get -bash: nvm: command not found
When installing again:
=> nvm is already installed in /Users/Tony/.nvm, trying to update
=> HEAD is now at 5f5eb47... v0.18.0
I do have npm already installed. Does that matter?
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
ljharb commentedon Nov 13, 2014
Having
node
andnpm
already installed doesn't matter.However, you do need to
nvm use
beforenvm
will take over yourPATH
and let you usenvm
's version of node.Can you check your
~/.bash_profile
and~/.bashrc
for the relevantnvm
lines, and paste them here? Also, what doesecho $PATH
say on a new shell?ljharb commentedon Nov 22, 2014
Please reopen if you discover this is actually a problem with
nvm
.alfredbez commentedon Dec 4, 2014
I had the same issue until I added the following lines to my
.bash_profile
ljharb commentedon Dec 4, 2014
Hmm,
install.sh
should add those to.bashrc
or.bash_profile
for you, which if you'd manually created it, should be sourced insidebash_profile
. Perhaps that's the issue, that bashrc exists but isn't sourced inside bash_profile?am11 commentedon Jan 16, 2015
I was having the same issue. After installing nvm, I had to exit from bash and re-login to make it work (I read it somewhere earlier). I think we should update the README.
Tried on CentOS 7 in VM (dev installation mode, CLI only).
jeancdc commentedon Apr 4, 2015
Hi,
I've got the same problem on Mac OS X 10.10 Yosemite. I've installed nvm with the command :
curl https://raw.githubusercontent.com/creationix/nvm/v0.24.0/install.sh | bash
This add the following lines in my .bashrc file:
export NVM_DIR="/Users/jeancreuzedeschatelliers/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
And I also add the following line at the bottom of the same file:
source ~/.nvm/nvm.sh
But it doesn't work. I must execute this last command every time I want use nvm.
Any idea ?
ljharb commentedon Apr 4, 2015
@jeancdc
. something
andsource something
are the same, except that the.
is more portable, so you should definitely remove that redundantsource
line.However, unless you run something like
nvm alias default stable
, every shell is intended to start withnvm
in a deactivated but available state. Perhaps that's the issue?jeancdc commentedon Apr 4, 2015
source ~/.nvm/nvm.sh
line,nvm install 0.12.2
nvm alias default 0.12.2
But still the same problem when I quit the terminal and restart it... I must execute
source ~/.nvm/nvm.sh
every time I launch the terminal...ljharb commentedon Apr 4, 2015
export NVM_DIR="/Users/jeancreuzedeschatelliers/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
- this should be two lines, like so:ljharb commentedon Apr 4, 2015
@jeancdc does that fix your issue?
jeancdc commentedon Apr 5, 2015
It was already two lines. Maybe I made wrong when I copied-paste this.
But still the same problem... :-(
jeancdc commentedon Apr 5, 2015
OK, I've done the same thing than @alfredbez and it works:
Like he said, I must to add the following lines at the end of the
~/.bash_profile
file:Maybe the author @creationix should add these instructions in the README.markdown file.
Thanks to you !
ljharb commentedon Apr 5, 2015
@jeancdc Usually the install script does it for you, so nothing is needed in the readme. what OS are you using?
190 remaining items