nvm use not updating node version

1 min read

Recently, I attempted to set up git on my mac after resetting it, but I couldn't set up a project for the node version I was using. I was finally able to identify the problem after trying for some time. I had multiple executables of nodejs on my machine that were causing the issue.

/opt/homebrew/opt/node@16/bin/node
/Users/ayushsaini/.nvm/versions/node/v18.17.1/bin/node

Also, you can find out if your machine has multiple nodes:

which -a node

so i uninstalled the node@16 that was installed via brew:

brew uninstall node@16

now, i was able to use nvm to change node version, for example:

nvm use 18.17.1
Now using node v18.17.1 (npm v9.6.7)
node -v
v18.17.1

If you found this article helpful, I would be grateful for your support.
"Buy me some paneer curry"

Comments

I'd love to read your thoughts on this article!!!