npm install with error: `gyp` failed with exit code: 1

If this is a mac machine (OSX) here is what you can do

use terminal

xcode-select --print-path

then remove installed version

sudo rm -r -f /Library/Developer/CommandLineTools

and reinstall

xcode-select --install

that should fix the problem

Ref: gyp: No Xcode or CLT version detected macOS Catalina

Leave a Comment