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:
Sample Error
Update your Mac. We would like to inform all developers building for Apple devices that macOS Catalina (10.15.4) is now available as a CI/CD environment on Semaphore. The following versions of Xcode are pre-installed: 11.2.1 – release notes; 11.3.1 – release notes; 11.4.1 – release notes; 11.5 – release notes. We have released Xcode 11.2, which will replace the beta release. The new image contains Xcode 11.2, running on Catalina. You can select this image by selecting 11.2.0 as follows: jobs: build: macos: xcode: 11.2.0 This is the first image that we’ve built with Catalina, so there might be some bugs – please let us know if you find anything out of the ordinary. Highlights The OS has been. With the Catalina upgrade, my Xcode did not automatically update to 11.1. The App Store kept trying to update Xcode each night through automatic updates. On its own, it never succeeded. Once it reported it could not download Xcode: Unable to Download App. 'Xcode' could not be installed. Please try again later.
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
Mac Catalina Xcode Version
If the below acid test passes, we are good to go.
Verify
Finally, we'll run the initial npm install
that failed for us.
References
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?
Xcode Version For Catalina
Read more here: https://stackoverflow.com/questions/63892933/which-xcode-version-is-compatible-with-macos-catalina-10-15-beta
Content Attribution
This content was originally published by BabyDriver at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.
Comments are closed.