From 1155459ef187ba16c88fb9690038b404a47b9284 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 7 Jun 2020 07:44:24 +0200 Subject: [PATCH 1/2] docs: node-gyp v7 should solve the gyp: No Xcode or CLT version detected! issue. --- macOS_Catalina.md | 1 + 1 file changed, 1 insertion(+) diff --git a/macOS_Catalina.md b/macOS_Catalina.md index 9ad2be5535..f7f90e7261 100644 --- a/macOS_Catalina.md +++ b/macOS_Catalina.md @@ -1,4 +1,5 @@ # Installation notes for macOS Catalina (v10.15) +### [node-gyp v7](https://github.com/nodejs/node-gyp/releases) should solve the [`gyp: No Xcode or CLT version detected!`](https://github.com/nodejs/node-gyp/issues?q=is%3Aissue+label%3A%22gyp%3A+No+Xcode+or+CLT+version+detected%21%22+is%3Aclosed) issue. _This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or when future Catalina versions no longer raise these issues._ From 54f0ade7e61be89ca1d8f1003ed0c0a2acccf482 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 16 Jun 2020 18:55:40 +1000 Subject: [PATCH 2/2] fixup! docs: node-gyp v7 should solve the gyp: No Xcode or CLT version detected! issue. --- macOS_Catalina.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/macOS_Catalina.md b/macOS_Catalina.md index f7f90e7261..e16f455cc0 100644 --- a/macOS_Catalina.md +++ b/macOS_Catalina.md @@ -1,5 +1,4 @@ # Installation notes for macOS Catalina (v10.15) -### [node-gyp v7](https://github.com/nodejs/node-gyp/releases) should solve the [`gyp: No Xcode or CLT version detected!`](https://github.com/nodejs/node-gyp/issues?q=is%3Aissue+label%3A%22gyp%3A+No+Xcode+or+CLT+version+detected%21%22+is%3Aclosed) issue. _This document specifically refers to upgrades from previous versions of macOS to Catalina (10.15). It should be removed from the source repository when Catalina ceases to be the latest macOS version or when future Catalina versions no longer raise these issues._ @@ -9,6 +8,21 @@ _This document specifically refers to upgrades from previous versions of macOS t gyp: No Xcode or CLT version detected! ``` +## node-gyp v7 + +The newest release of `node-gyp` should solve this problem. If you are using `node-gyp` directly then you should be able to install v7 and use it as-is. + +If you need to use `node-gyp` from within `npm` (e.g. through `npm install`), you will have to install `node-gyp` (either globally with `-g` or to a predictable location) and tell `npm` where the new version is. Either use: + +* `npm config set node_gyp `; or +* run `npm` with an environment variable prefix: `npm_config_node_gyp= npm install` + +Where "path to node-gyp" is to the `node-gyp` executable which may be a symlink in your global bin directory (e.g. `/usr/local/bin/node-gyp`), or a path to the `node-gyp` installation directory and the `bin/node-gyp.js` file within it (e.g. `/usr/local/lib/node_modules/node-gyp/bin/node-gyp.js`). + +**If you use `npm config set` to change your global `node_gyp` you are responsible for keeping it up to date and can't rely on `npm` to give you a newer version when available.** Use `npm config delete node_gyp` to unset this configuration option. + +## Fixing Catalina for older versions of `node-gyp` + ### Is my Mac running macOS Catalina? Let's first make sure that your Mac is running Catalina: ``` @@ -31,7 +45,7 @@ If test succeeded, _you are done_! You should be ready to install `node-gyp`. If test failed, there is a problem with your Xcode Command Line Tools installation. [Continue to Solutions](#Solutions). ### Solutions -There are three ways to install the Xcode libraries `node-gyp` needs on macOS. People running Catalina have had success with some but not others in a way that has been unpredictable. +There are three ways to install the Xcode libraries `node-gyp` needs on macOS. People running Catalina have had success with some but not others in a way that has been unpredictable. 1. With the full Xcode (~7.6 GB download) from the `App Store` app. 2. With the _much_ smaller Xcode Command Line Tools via `xcode-select --install`