Skip to content

docs: node-gyp v7 should solve the gyp: No Xcode or CLT version detec… #2156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion macOS_Catalina.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,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 <path to node-gyp>`; or
* run `npm` with an environment variable prefix: `npm_config_node_gyp=<path to 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:
```
Expand All @@ -30,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`
Expand Down