2

enter image description here

After upgrading node using chocolatey I type in the command node -v and it returns the wrong version number. Some one solved the same issue with homebrew here using an override command.

How can I solve this problem using chocolatey?

RyeGuy
  • 4,213
  • 10
  • 33
  • 57
  • v8.1.3 is the latest package of node for now. I think the above seems a reasonable output. can you explain the problem like what is the expected output from your side. – Arpit Solanki Jul 03 '17 at 14:59
  • yes when I run install commands with node it is using version v0.12.2. I expect that when I type in node -v it will return v8.1.3 – RyeGuy Jul 03 '17 at 15:02
  • i think that it does not set the node 8.1.2 as default node. If you are able to find that where it installs node binaries than you can verify. Sorry can't help you more than this i have linux – Arpit Solanki Jul 03 '17 at 15:05

1 Answers1

2

Start by making sure you restart bash. I've seen the versions not update in the same window I used to install the new version. If that doesn't do it then I would also remove the old version of node.

The where node command is helpful for finding that pesky old version.

pythomatic
  • 647
  • 4
  • 13
  • Thanks for the response. I've located the packages using node where. What command do I use to restart bash? – RyeGuy Jul 03 '17 at 15:10
  • Honestly you can just close it and reopen it. Alternatively you could try: `. ~/.bashrc` – pythomatic Jul 03 '17 at 15:13
  • Ya I have closed and reopened it. The problem still exists :( – RyeGuy Jul 03 '17 at 15:14
  • 2
    Nodejs shows up in the list of programs on windows, and they are usually version specific. I would try just uninstalling the old version from there. If that doesn't fix it, a clean install might. This might help you remove the old version completely: https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows – pythomatic Jul 03 '17 at 15:18
  • Thx I'll give it a try – RyeGuy Jul 03 '17 at 15:21
  • 2
    @Eqomatic you can also try refreshenv (comes with choco) to refresh environment variables in your current shell. It works in cmd.exe and powershell.exe (with the profile/tab completion installed). I'm not sure if it would work in bash as the way to update those would be $ instead of %%. – ferventcoder Jul 05 '17 at 16:32
  • 1
    `where.exe` is synonymous with `which` - giving both a shot, you may find that you have something non-Windows you are running into. – ferventcoder Jul 05 '17 at 16:33