Today I have quite funny experience, I tried update node & npm to newest version but i get information it is already installed.
rew unlink node && brew link node
Unlinking /usr/local/Cellar/node/17.4.0… 7 symlinks removed.
Linking /usr/local/Cellar/node/17.4.0… 7 symlinks created.
trying check version show wrong one
I tried everything, from uninstalling, brew cleanup, link, relink, overwrite – without success.
Solution, edit file (in homedirectory):
In content locate & remove line:
After removing restart computer and confirm correct version of node