Is node-gyp (Node.js native addon build tool) failing during yarn install
or npm install
? If your macOS got upgraded to Catalina (10.15) recently, then you will find the fix right here.
I'm using VMware to run macOS Catalina 10.15 beta I tried to download xcode from the appstore and it won't After that I downloaded the XCode 11.7 from the developer download, and installed it but won't work So I will download another XCode version, but Which XCode version is compatible with macOS Catalina 10.15 beta? Download and Install macOS Catalina. Install Xcode 11 Beta. SwiftUI Tutorial. Create a new APFS Volume. Open up Disk Utility — you can use spotlight by pressing cmd+space: Now right click your main hard drive — it is most likely called Macintosh HD and select Add APFS Volume.

Explainer Video:

Sample Error

So, what went wrong?
node-gyp uses XCode Command Line Tools for macOS.
Both upgrading to macOS Catalina and running a Software Update in Catalina may cause normal node-gyp installations to fail. This might manifest as the following error during npm install:
gyp: No Xcode or CLT version detected!
Reference: Installation notes for macOS Catalina (v10.15)

Check MacOS version
Run sw_vers
in terminal to check your MacOS version. Actually, if ProductVersion
is less then 10.15, then fix of this post may not be applicable.
How to fix?
Reinstall the XCode Command Line Tools.
- Remove the XCode Command Line Tools.or
- Install the XCode Command Line Tools.Click 'Install' button in the wizard, accept 'License Agreement' and click 'Done' once the software is installed.
Acid Test
If the below acid test passes, we are good to go.
Verify
Finally, we'll run the initial npm install
that failed for us.