Catalina Xcode Version
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.
Explainer Video:
The version of Xcode you can run is in the row above the one you found. For example, the latest version of Xcode you can run on macOS 10.13.6 (High Sierra) is Xcode 10.1. Keep in mind that running an older version of Xcode often limits for which iOS, Swift and SwiftUI versions you can build. Install Xcode on MacOS Mojave and test with Virtualbox on Windows 10 2020Can we install MacOS with Virtualbox on Windows 10 to develop iOS apps?- Yessssss!!y.
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) Emulator ios for mac.
Check MacOS version
No packages were eligible for install mac. 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.
Mac Catalina Xcode Version
Verify
Catalina 10.15 Xcode Version
Finally, we'll run the initial npm install
that failed for us.