-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
build: Add macOS_Catalina.md document #1940
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e6aca7d
src,win: allow 403 errors for arm64 node.lib
richardlau a7661bb
build: Add macOS_Catalina.md document
cclauss f25a41f
fixup: typos
cclauss f21b984
Add Time To Live statement to the document
cclauss e6d1932
fixup: revert all changes to install.js
cclauss 6ee07ff
Add link from README.md to notes-on-macOS-Catalina
cclauss 98b631f
fixup: macOS_Catalina.md
cclauss 30ce8eb
fixup: Update macOS_Catalina.md
cclauss 5402880
fixup: add the missing dash in "--install"
cclauss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Installation notes for macOS Catalina (v10.15) | ||
|
||
_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 updated to deal with challenges involved in upgrades to the next version of macOS._ | ||
|
||
Lessons learned from: | ||
* https://github.com/nodejs/node-gyp/issues/1779 | ||
* https://github.com/nodejs/node-gyp/issues/1861 | ||
* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere | ||
|
||
Installing `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos | ||
|
||
However, upgrading to macOS Catalina changes some settings that may cause normal `node-gyp` installations to fail. | ||
|
||
### Is my Mac running macOS Catalina? | ||
Let's make first make sure that your Mac is currently running Catalina: | ||
% `sw_vers` | ||
ProductName: Mac OS X | ||
ProductVersion: 10.15 | ||
BuildVersion: 19A602 | ||
|
||
If `ProductVersion` is less then `10.15` then this document is not really for you. | ||
|
||
### The acid test | ||
Next, lets see if `Xcode Command Line Tools` are installed: | ||
1. `/usr/sbin/pkgutil --packages | grep CL` | ||
* If nothing is listed, then [skip to the next section](#Two-roads). | ||
* If `com.apple.pkg.CLTools_Executables` is listed then try: | ||
2. `/usr/sbin/pkgutil --pkg-info com.apple.pkg.CLTools_Executables` | ||
* If `version: 11.0.0` or later is listed then _you are done_! Your Mac should be ready to install `node-gyp`. Doing `clang -v` should show `Apple clang version 11.0.0` or later. | ||
|
||
As you go through the remainder of this document, at anytime you can try these `acid test` commands. If they pass then your Mac should be ready to install `node-gyp`. | ||
|
||
### Two roads | ||
There are two main ways to install `node-gyp` on macOS: | ||
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` | ||
|
||
### Installing `node-gyp` using the full Xcode | ||
1. `xcodebuild -version` should show `Xcode 11.1` or later. | ||
* If not, then install/upgrade Xcode from the App Store app. | ||
2. Open the Xcode app and allow it to do an essential install of the most recent compiler tools. | ||
3. Once all installations are _complete_, quit out of Xcode. | ||
4. `sudo xcodebuild -license accept` # If you agree with the licensing terms. | ||
5. `softwareupdate -l` # No listing is a good sign. | ||
* If Xcode or Tools upgrades are listed, use "Software Upgrade" to install them. | ||
6. `xcode-select -version` # Should return `xcode-select version 2370` or later. | ||
7. `xcode-select -print-path` # Should return `/Applications/Xcode.app/Contents/Developer` | ||
8. Try the [_acid test_ steps above](#The-acid-test) to see if your Mac is ready. | ||
9. If the _acid test_ does _not_ pass then... | ||
10. `sudo xcode-select --reset` # Enter root password. No output is normal. | ||
11. Repeat step 7 above. Is the path different this time? Repeat the _acid test_. | ||
|
||
### Installing `node-gyp` using the Xcode Command Line Tools | ||
1. If the _acid test_ has not succeeded, then try `xcode-select --install` | ||
2. Wait until the install process is _complete_. | ||
3. `softwareupdate -l` # No listing is a good sign. | ||
* If Xcode or Tools upgrades are listed, use "Software Update" to install them. | ||
4. `xcode-select -version` # Should return `xcode-select version 2370` or later. | ||
5. `xcode-select -print-path` # Should return `/Library/Developer/CommandLineTools` | ||
6. Try the [_acid test_ steps above](#The-acid-test) to see if your Mac is ready. | ||
7. If the _acid test_ does _not_ pass then... | ||
8. `sudo xcode-select --reset` # Enter root password. No output is normal. | ||
9. Repeat step 5 above. Is the path different this time? Repeat the _acid test_. | ||
|
||
### I did all that and the acid test still does not pass :-( | ||
1. `sudo rm -rf $(xcode-select -print-path)` # Enter root password. No output is normal. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This actually worked for me, thnx! |
||
2. `xcode-select --install` | ||
3. If the [_acid test_](#The-acid-test) still does _not_ pass then... | ||
4. Add a comment to https://github.com/nodejs/node-gyp/issues/1927 so we can improve. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked for me! Thank you :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could I please get your review on this PR?