Monthly Archives: February 2022

[Mac Monterey / Brew] keep showing (using) wrong (old) version of NPM / Node – when trying to reinstall / link – say it’s already done!

Today I have quite funny experience, I tried update node & npm to newest version but i get information it is already installed.

brew 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

npm -v
node -v

I tried everything, from uninstalling, brew cleanup, link, relink, overwrite – without success.

Solution, edit file (in homedirectory):


In content locate & remove line:

export PATH="/usr/local/opt/node@12/bin:$PATH"

After removing restart computer and confirm correct version of node

npm -v
node -v

Mission successful

Warning: Undefined array key 0 in /www/wwwroot/ on line 602