Skip to content

Commit ee6fa7d

Browse files
committed
docs: note that node-gyp@7 should solve Catalina CLT issues
PR-URL: #2156 Reviewed-By: Christian Clauss <[email protected]>
1 parent 4fc8ff1 commit ee6fa7d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

macOS_Catalina.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ _This document specifically refers to upgrades from previous versions of macOS t
88
gyp: No Xcode or CLT version detected!
99
```
1010

11+
## node-gyp v7
12+
13+
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.
14+
15+
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:
16+
17+
* `npm config set node_gyp <path to node-gyp>`; or
18+
* run `npm` with an environment variable prefix: `npm_config_node_gyp=<path to node-gyp> npm install`
19+
20+
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`).
21+
22+
**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.
23+
24+
## Fixing Catalina for older versions of `node-gyp`
25+
1126
### Is my Mac running macOS Catalina?
1227
Let's first make sure that your Mac is running Catalina:
1328
```
@@ -30,7 +45,7 @@ If test succeeded, _you are done_! You should be ready to install `node-gyp`.
3045
If test failed, there is a problem with your Xcode Command Line Tools installation. [Continue to Solutions](#Solutions).
3146

3247
### Solutions
33-
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.
48+
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.
3449

3550
1. With the full Xcode (~7.6 GB download) from the `App Store` app.
3651
2. With the _much_ smaller Xcode Command Line Tools via `xcode-select --install`

0 commit comments

Comments
 (0)