I've started using asdf at work and I faced some errors with node-gyp. This is a note for my future self.
To solve you'll need to remove older versions and update nodejs asdf installation with the newest npm installation
brew uninstall node
brew uninstall yarn
brew cleanup --prune-prefix
# https://github.com/asdf-vm/asdf/issues/162#issuecomment-383286403
cd ~/.asdf/installs/nodejs/[VERSION]/lib && npm i npm
# https://github.com/asdf-vm/asdf/issues/162#issuecomment-321791251
asdf reshim nodejs