If you’re seeing this error on a Mac, run
sudo rm -rf $(xcode-select -print-path)
xcode-select --install
Source: How to fix the Node gyp Error: No Xcode or CLT version detected
node-gyp
also has documentation on how to resolve the error.
I’m currently on Big Sur 11.4.