Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

. ~/.nvm/nvm.sh --install doesn't install the required Node version #646

Closed
mgol opened this issue Feb 7, 2015 · 3 comments
Closed

. ~/.nvm/nvm.sh --install doesn't install the required Node version #646

mgol opened this issue Feb 7, 2015 · 3 comments

Comments

@mgol
Copy link
Contributor

mgol commented Feb 7, 2015

$ . ~/.nvm/.nvm.sh
$ nvm --version
0.23.3
$ cd APPLICATION_FOLDER
$ cat .nvmrc
0.12
$ . ~/.nvm/nvm.sh --install
v0.10.36 is already installed.
$ node --version
v0.10.36

I'd expect it to activate the requested version, not the one that was already installed...

Refs #545

@ljharb
Copy link
Member

ljharb commented Feb 7, 2015

What does nvm alias default print out?

@mgol
Copy link
Contributor Author

mgol commented Feb 7, 2015

$ nvm alias default
default -> 0.10 (-> v0.10.36)
$ nvm ls
->     v0.10.36
         system
default -> 0.10 (-> v0.10.36)
stable -> 0.10 (-> v0.10.36) (default)

So that's probably why. Is it expected when there's .nvmrc present?

@ljharb
Copy link
Member

ljharb commented Feb 7, 2015

Yes - default takes precedence over nvmrc, which only occurs when sourcing. nvm unalias default, or nvm alias default stable should cause the --install behavior you'd expect.

@ljharb ljharb closed this as completed Feb 7, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants