7

I am trying to update my local node version from 8.9.0 to 8.10.0 using nvm. But it's not getting reflected. Here's what I tried:

node -v

-> v8.9.0

nvm use 8.10.0

-> Now using node v8.10.0 (npm v5.5.1)

node -v

-> v8.9.0

I am unable to get why it won't change. Please let me know what have I done wrong.

psr
  • 2,179
  • 2
  • 24
  • 51
  • 2
    You might have Node installed in multiple paths, with `nvm` only managing one. What does `which -a node` tell you? – Jonathan Lonowski Oct 06 '18 at 06:34
  • It says `/usr/local/bin/node`, `/Users/prabhjotrai/.nvm/versions/node/v8.10.0/bin/node`, `/usr/local/bin/node` ``` – psr Oct 06 '18 at 07:02
  • I see there are multiple paths, what fix would you suggest? – psr Oct 06 '18 at 07:05
  • 5
    Have you installed Node via Homebrew as well? If so, [`brew uninstall node`](https://stackoverflow.com/a/26919540) would uninstall the instance at `/usr/local/bin/node`, leaving the other managed by nvm. Otherwise, you can try to [modify your `PATH` variable](https://stackoverflow.com/questions/7703041) (or any shell configs which may alter it before opening) to give the nvm path priority. – Jonathan Lonowski Oct 06 '18 at 07:38
  • nvm maintainer here - the issue is likely that your PATH isn't set up properly in your shell profile file. the easiest solution is to move the nvm sourcing lines to the end of it. If that still doesn't work, please file an issue on the github repo. – LJHarb Mar 06 '21 at 20:40

1 Answers1

-1

First check your nvm version installed on your local system. go to command prompt and type "nvm list" If you don't see the versions 8.10.0 in the list then install using command : "nvm install 8.10.0" and then try "nvm use 8.10.0".

For reference : http://www.tutorial-points.com/2018/11/nvm-installation-on-windows.html