Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

docs: complete macOS node-gyp troubleshooting steps in CONTRIBUTING.md #4036

Merged
merged 7 commits into from
Jun 21, 2023
Merged
13 changes: 8 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ If installation fails due to a `node-gyp` issue you may need to perform some add

### on macOS

- Determine if you have Xcode command line tools installed
- example the console will tell you if they're already installed): `xcode-select --install`
- Determine if you have Python 2.7 installed
- example: `which python2.7`
- If you do not have Python 2.7 installed, you need to install it. We recommend `pyenv` for this so you can keep the default MacOS python installation untouched.
- Attempt to install Xcode command line tools (the console will tell you if they're already installed)
- example: `xcode-select --install`
- Determine if you have Python 2.x installed
- example: `which python`
- If you do not have Python 2.x installed, you need to install it. We recommend `pyenv` for this so you can keep the default MacOS python installation untouched.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know Python things... but does this need to be Python 2.7.x?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which python won't necessarily tell you which version is installed (for example, if you use pyenv, it'll just show you the shim).

python --version is probably more useful.

davidmurdoch marked this conversation as resolved.
Show resolved Hide resolved
1. [Install `pyenv`](https://github.com/pyenv/pyenv#homebrew-in-macos)
2. [Setup your shell environment for `pyenv`](https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv)
3. Install Python 2.x: `pyenv install 2.7.18`
- If the above steps don't fix the `node-gyp` issue and you've recently updated your OS, you may need to re-install Xcode command line tools:
1. Remove the existing, broken installation: `rm -rf /Library/Developer/CommandLineTools`
2. Install them again: `xcode-select --install`

## Clean install

Expand Down