Is this an Issue with MACOS catalina?

EDITED FOR PEOPLE JUST GETTING HERE:
node-gyp v7 should solve these issues.
Please follow the steps in macOS_Catalina.md

<EMAIL_ADDRESS>install /Users/drjosephdavids/node_modules/keccakjs/node_modules/sha3
node-gyp rebuild

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!   System Darwin 19.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/drjosephdavids/node_modules/keccakjs/node_modules/sha3
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/drjosephdavids/package.json'
npm WARN drjosephdavids No description
npm WARN drjosephdavids No repository field.
npm WARN drjosephdavids No README data
npm WARN drjosephdavids No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      /Users/drjosephdavids/.npm/_logs/2019-10-16T17_41_20_021Z-debug.log

Node Version:
Platform:
Compiler:
Module:

Verbose output (from npm or node-gyp):
Paste your log here, between the backticks. It can be:
  - npm --verbose output,
  - or contents of npm-debug.log,
  - or output of node-gyp rebuild --verbose.

gyp: No Xcode or CLT version detected! I'M RUNNING XCODE 11.2beta

Did you add that "I'M RUNNING XCODE 11.2beta" to the output? That may be the main problem, using a beta version of xcode. But you could also try installing the command-line tools to solve this: xcode-select --install and then sudo xcodebuild -license accept after that succeeds. gcc -v should show you have something like Apple clang version 11.0.0 (clang-1<IP_ADDRESS>).

No I didn’t I was merely saying that I do have XCode installed

I have the same issue

please try installing the commandline tools like I suggested, it's different to the full xcode

When I run xcodebuild i get this
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

When I run gcc -v I get this
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1<IP_ADDRESS>)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

When I run xcodebuild i get this
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

See https://github.com/nodejs/node-gyp/issues/569.

Thanks that works. I will let my users know.

@joe-nano Can this issue be closed?

Same issue to me. node-gyp rebuild fails.
I'm using 10.15 Catalina and installed XCode CLI by xcode-select --install. But no com.apple.pkg.DeveloperToolsCLILeo, com.apple.pkg.DeveloperToolsCLI, com.apple.pkg.CLTools_Executables found.

Related source: https://github.com/nodejs/node-gyp/blob/a84b88575629f9190bceb7da6787895f8acf662d/gyp/pylib/gyp/xcode_emulation.py#L1298-L1318
Is there a way to fix it without installing full XCode.app?

sudo xcodebuild -license accept

sudo xcodebuild -license accept cannot solve this problem without XCode.app.
Returns:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

sudo xcodebuild -license accept cannot solve this problem without XCode.app.
Returns:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Same issue.

Could I please get a few of you to run /usr/sbin/pkgutil --packages | grep code on your Catalina boxes?
% /usr/sbin/pkgutil --packages | grep code
com.apple.pkg.XcodeSystemResources
com.apple.pkg.Xcode

Could I please get a few of you to run /usr/sbin/pkgutil --packages | grep CLTools on Catalina?
% /usr/sbin/pkgutil --packages | grep CLTools
com.apple.pkg.CLTools_Executables
com.apple.pkg.CLTools_SDK_macOS1015
com.apple.pkg.CLTools_SDK_macOS1014
com.apple.pkg.CLTools_macOS_SDK

If you get nothing returned, please do xcode-select --install and then try the pkgutil command again.

It returns nothing
Last login: Sun Oct 20 15:22:02 on ttys002
mkellsy@mikes-laptop ~ % /usr/sbin/pkgutil --packages | grep CLTools
mkellsy@mikes-laptop ~ %

This worked for me.

Install full Xcode
Open Xcode and the CLT will install
Then run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

This uses the full Xcode CLT and node-gyp works.

OK.  Thanks.  The goal is NOT to install full Xcode.  Perhaps we needed to sudo on the xcode-select --install command.  Did you look in "Software Update" to see if there was something there?

Uninstalling command-line tools as described in the offiial documentation, then run xcode-select --install solves this problem for me.

OK. Thanks. The goal is NOT to install full Xcode. Perhaps we needed to sudo on the xcode-select --install command. Did you look in "Software Update" to see if there was something there?

Yep, only Xcode.
For my Mac users, I am directing them to install full Xcode. Our team finds the instructions much easier then this https://developer.apple.com/library/archive/technotes/tn2339/_index.html.
Note that many of our users will not go to the Apple developer site. However they can tolerate a command here and there.

If you get nothing returned, please do sudo xcode-select --install and then try the pkgutil command again.

On Catalina with command line tools (but no Xcode) I'm getting the same as others:

nothing found by /usr/sbin/pkgutil --packages | grep CLTools
trying to install CLT again gives me xcode-select: error: command line tools are already installed, use "Software Update" to install updates
no updates available in Software Update
lozinsky's suggestion didn't work for me (no change to the above points after deleting /Library/Developer/CommandLineTools and reinstalling with xcode-select --install)

Naïve question: Is there a reason the script needs to know the version? Is it not enough to just check the install location with xcode-select -p (c.f. https://stackoverflow.com/a/15371967)?

The comment says this check was ported from Homebrew:
https://github.com/nodejs/node-gyp/blob/a84b88575629f9190bceb7da6787895f8acf662d/gyp/pylib/gyp/xcode_emulation.py#L1298
FWIW, in macOS 10.14 and greater Homebrew checks whether CLT need to be installed based on the presence of git:
https://github.com/Homebrew/install/blob/52237ea74f41d2456a5b1bd3e4c2b0cb94485c3c/install#L118-L128

Is there another way to test these cases on Jenkins?

I think we'd need someone to set up a Catalina host at MacStadium. I think our most active MacStadium deployer might have been @gdams but I'm not sure he's active on the project anymore. Unless gdams jumps in here with a "Yeah, let me get that set up for you", more definitive word on whether this can happen easily/quickly will have to come from @rvagg or @mhdawson, I think. I'm guessing it's not easy or quick since we're always several versions behind on our macOS hosts in Jenkins. But again, I'm speculating.

Sadly no, so far we haven't even been able to get High Sierra on MacStadium. Image availability and other complications. We do have some new Mac infrastructure we're introducing (and managing ourselves unfortunately) but that's a work in progress.
Everything about this is hard.
Also, I'll be holding back my laptop from Catalina, I can't afford the chaos, so I can't even help figure this all out.

I edited the original post with the fix that @gibfahn added to #569.

@joe-nano, et al, Can we close this issue?

Not fixed with #569

@cclauss

@gibfahn Any other hints?

re: https://github.com/nodejs/node-gyp/issues/1927#issuecomment-544934007
gibfahn and gdams aren't working on this anymore, and I suspect have disabled all notifications (I would have if I was them).
I'm in the process of attempting to get into macstadium's management console, to see what the situation is now, and what we can do. This won't be fast (needs vbox, cisco vpn clients, etc, etc just to connect).

Sortof update:
@cclauss looked at this, and he's proposes that if pkgutil can't find it, but clang exists, that the clang version be used to deduced the Xcode major version. clang version doesn't include the Xcode minor or patch... but those don't seem to be used anywhere, all the version checks are on the major.
He'll take a shot at this.

I found a solution to this and it works. All you need is to download and install xcode command line tools and this error will no longer come. The installation process will take some time. Verified in mac os catalina
https://developer.apple.com/download/more/
https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_11/Command_Line_Tools_for_Xcode_11.dmg

Yes as discussed above this works but takes up a lot of disc space.

Hi, I try to use this to re-install the command-line tool, it works.

Thanks @naiba   I have done that (rm -fr ) a few times on my Mac and it does work.
If someone new comes along, I would like them to try:
/usr/sbin/pkgutil --packages | grep CL
sudo xcode-select --reset
/usr/sbin/pkgutil --packages | grep CL

Which seemed to be the solution here.

I encountered this issue. Per the guidance from @cclauss, I ran the following:
/usr/sbin/pkgutil --packages | grep CL
# No output
sudo xcode-select --reset
# No output
/usr/sbin/pkgutil --packages | grep CL
# No output

After doing that, I was prompted to run sudo xcodebuild -license, and then after that, my installation (through yarn) was successful and clean.

Perfect @jeffhandley Now after sudo xcodebuild -license, what do the commands /usr/sbin/pkgutil --packages | grep CL and softwareupdate -l Return?  Did you open the Xcode app to see if it asked you to do any upgrades or was that not required?  Thanks!

/usr/sbin/pkgutil --packages | grep CL has no output.
> softwareupdate -l
Software Update Tool

Finding available software
No new software available.

Running the Xcode app prompts me to "Install additional required components."

Xcode requires additional components to support running and debugging. Choose Install to add required components.

For completeness, please rerun those two commands after the essential tools upgrade.

After installing the essentials tools upgrade:
> usr/sbin/pkgutil --packages | grep CL
# No output

> softwareupdate -l
Software Update Tool

Finding available software
No new software available.

Thanks.  I will write a doc in the morning...  Please review it.
Big bonus points to whoever can demonstrate how to test on Catalina in Travis CI or GitHub Actions CI or Jenkins.  Perhaps in a Docker container or similar.

Thanks @naiba
I have done that (rm -fr $(xcode-select --print-path) ; xcode-select --install) a few times on my Mac and it does work.
If someone new comes along, I would like them to try:
/usr/sbin/pkgutil --packages | grep CL
sudo xcode-select --reset
/usr/sbin/pkgutil --packages | grep CL

Which seemed to have been the solution here.

Am I missing something? If sudo xcode-select --reset changes the path to /Applications/Xcode.app/Contents/Developer (as per the "solution" linked) then doesn't that only help in situations where Xcode is installed? I thought the goal was to have it work with the Command Line Tools, regardless of whether or not Xcode is installed?

I thought the goal was to have it work with the Command Line Tools, regardless of whether or not Xcode is installed?

Correct.  @naiba is running without Xcode https://github.com/nodejs/node-gyp/issues/1927#issuecomment-544400573

Please review https://github.com/nodejs/node-gyp/pull/1940/files

Please review https://github.com/nodejs/node-gyp/pull/1940/files

The last steps to removing and install worked for me!

sudo rm -rf $(xcode-select -print-path)  # Enter root password.  No output is normal.
xcode-select --install

Please review nodejs/node-gyp/pull/1940/files

Followed to remove CLT folder and reinstall it. It works without the full Xcode installed.

I encountered this issue. Per the guidance from @cclauss, I ran the following:
/usr/sbin/pkgutil --packages | grep CL
# No output
sudo xcode-select --reset
# No output
/usr/sbin/pkgutil --packages | grep CL
# No output

After doing that, I was prompted to run sudo xcodebuild -license, and then after that, my installation (through yarn) was successful and clean.

This works for me

i had an issue with catalina 10.15.1:
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.1
BuildVersion:	19B88

i fixed it by uninstall xcode command-line (clt) and then reinstalling xcode command-line as follows:
$ sudo rm -rf $(xcode-select -print-path)
$ sudo xcode-select --install

you should have a non-empty output for the following command:
$ /usr/sbin/pkgutil --packages | grep CLTools
com.apple.pkg.CLTools_Executables
com.apple.pkg.CLTools_SDK_macOS1015
com.apple.pkg.CLTools_SDK_macOS1014
com.apple.pkg.CLTools_macOS_SDK

TIP:
if you spotlight keeps showing you developer search and you have installed only the command-line tools, you can disable it by
$ touch /Applications/Xcode.app

then head for spotlight in the settings and uncheck developer

I tried the instructions and @y0y0z ☝ still not working. I ended up installing XCode app.

So you chose road one and it is working?

@cclauss sorry for the confusion. I meant I followed the instructions sans the Xcode app. So yeah road one worked.

LOL... sans Xcode app is road two.

Start xcode, go to preferences -> Locations and choose "Xcode 11.x (...)" in the "Command Line Tools"-dropdown.. after that, everything is working fine

Removing and reinstalling the command line tools does the trick:
Enter root password. No output is normal.
$ sudo rm -rf $(xcode-select -print-path)
$ xcode-select --install#
(From https://github.com/nodejs/node-gyp/pull/1940/files)

I have removed xcode-select using this command
$ sudo rm -rf $(xcode-select -print-path)
But still getting this
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

And also my xcode is not working now.

I have mac os 10.15.1
in my case /usr/sbin/pkgutil --packages | grep CLTools prints nothing though i have xcode-select installed.
i you want to check that command line tools are installed or not refer to this https://stackoverflow.com/questions/15371925/how-to-check-if-command-line-tools-is-installed
I solved my node-gyp build issues by
rm -rf /usr/local/include/*
it seems that because I upgrade MacOS from Mojave to Catalina and some C++ .h files need to reinstall.

Your last command is not a recommended solution.

$ xcode-select --install
xcode-select: error: no developer tools were found, and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.

And surprise (not often error messages help:)) as stated in above error message downloading and installing Command Line Tools doe Xcode 11 from https://developer.apple.com/download/more/?=xcode solved all issues.

If you're Acid test is passed and still getting error when installing modules, try to downgrade your node version.
> node -v
v11.15.0

Worked fine for me.

What error were you getting before you downgraded?

@cclauss
I get this error when installing modules.

gyp: No Xcode or CLT version detected! I'M RUNNING XCODE 11.2beta

Did you add that "I'M RUNNING XCODE 11.2beta" to the output? That may be the main problem, using a beta version of xcode. But you could also try installing the command-line tools to solve this: xcode-select --install and then sudo xcodebuild -license accept after that succeeds. gcc -v should show you have something like Apple clang version 11.0.0 (clang-1<IP_ADDRESS>).

if not success, you can use sudo xcode-select -r, will be ok.

I have removed xcode-select using this command
$ sudo rm -rf $(xcode-select -print-path)
But still getting this
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

And also my xcode is not working now.

Same exact issue here.  Deleted Xcode app, and then app store refused to re-install it.  Had to manually find and delete extra Xcode files and then restart before I could reinstall Xcode.  However, I'm back to the same issue as before where Xcode is installed, has been opened, license has been accepted, etc., but I get no results when running: /usr/sbin/pkgutil --packages | grep CL
I ran through every step in the readme file, but still cannot build node-gyp and the ACID test still does not pass for me.
Any suggestions?

Download and install Xcode from apple developers site. This is what worked for me. otherwise was running loops.

On 29 Nov 2019, at 15:09, Brian Duffey<EMAIL_ADDRESS>wrote:
I have removed xcode-select using this command
$ sudo rm -rf $(xcode-select -print-path)
But still getting this
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
And also my xcode is not working now.
Same exact issue here. Deleted Xcode app, and then app store refused to re-install it. Had to manually find and delete extra Xcode files and then restart before I could reinstall Xcode. However, I'm back to the same issue as before where Xcode is installed, has been opened, license has been accepted, etc., but I get no results when running: /usr/sbin/pkgutil --packages | grep CL
I ran through every step in the readme file, but still cannot build node-gyp and the ACID test still does not pass for me.
Any suggestions?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/nodejs/node-gyp/issues/1927?email_source=notifications&email_token=ADXJHOW64YZL354D3TWG4SLQWEWBTA5CNFSM4JBO2TRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFPCOTA#issuecomment-559818572, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHOVHZH4B52HG3SL6ZZLQWEWBTANCNFSM4JBO2TRA.

Xcode-select might install on multiple path so retry the steps until print-path come up empty.

Download and install Xcode from apple developers site. This is what worked for me. otherwise was running loops.

What steps did you take to uninstall the currently installed Xcode?  What version did you download from Apple's developer site?

Xcode-select might install on multiple paths so retry the steps until print-path comes up empty.

I'm not sure how this will help, as mentioned, the xcode-select never installs at all since it says xcode-select: error: command line tools are already installed, use "Software Update" to install updates even after uninstalling Xcode and running the sudo rm -rf command.

One for your macOS. I am on Catalina so latest 11.

On 29 Nov 2019, at 16:30, Brian Duffey<EMAIL_ADDRESS>wrote:

Download and install Xcode from apple developers site. This is what worked for me. otherwise was running loops.
What steps did you take to uninstall the currently installed Xcode? What version did you download from Apple's developer site?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Later it was updated via macOS updater to 11.2 I think. Now I am using node 13.2. And all works flawlessly.

On 29 Nov 2019, at 16:30, Brian Duffey<EMAIL_ADDRESS>wrote:

Download and install Xcode from apple developers site. This is what worked for me. otherwise was running loops.
What steps did you take to uninstall the currently installed Xcode? What version did you download from Apple's developer site?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

I went to xCode preferences --> Locations
in Comand line tools --> select xCode (it was empty value before);
after these steps, ndb was installed correctly

I had the same issue maybe its happening because of changes of node version, but I used npm audit fix and everything works fine now.

Hi All,
Sharing a new solution that worked for me.
NONE of the above solutions worked, (including macOS_Catalina.md) I tried all of them several times, even reinstalling XCode from the App Store.
Download the appropriate version of the "Command Line Tools for Xcode" for your version of Xcode from developer.apple.com/download
As of MacOS 10.15.2, that's 11.3: Command_Line_Tools_for_Xcode_11.3.dmg
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.2
BuildVersion:	19C57

Now the acid test works and shows what we're looking for!
$ pkgutil --packages | grep CL
com.apple.pkg.CLTools_Executables
com.apple.pkg.CLTools_SDK_macOS1015
com.apple.pkg.CLTools_SDK_macOS1014
com.apple.pkg.CLTools_macOS_SDK

BTW, I'm using fnm so I tested the previous solutions with node.js versions 10.17.0, 12.13.1, 13.3.0.

@rrrix thanks! It's the only thing that worked for me.
Initially I installed Xcode 11.3 and also installed command line tools from it.
Acid tests produced no output, everything else on  Catalina page worked fine.
Only after installing Command Line Tools manually using your method I got acid tests to pass.

After a frustrating hour, I finally found the @rrrix method here, which worked perfectly. This seems likely to be the solution for a lot of people, so I'll go ahead and submit a proposed change to macOS_Catalina.md.

After a frustrating hour, I finally found the @rrrix method here, which worked perfectly.

I second that. Now I just have to find a way to get rid of the +7GB installation of XCode that I did while trying to follow https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md without breaking anything.

For me, the acid tests all passed, but the install still failed with the same errors. I needed to run:
yarn cache clean && yarn upgrade && yarn.

Uninstalling command-line tools as described in the official documentation, then run xcode-select --install solves this problem for me.

After reading through all the comments it seems like this one got buried a little bit, this solution just worked for me! Basically just run /Library/Developer/CommandLineTools and then xcode select --install.

Uninstalling command-line tools as described in the official documentation, then run xcode-select --install solves this problem for me.

This also works for me. System: macOS 10.15.2

Uninstalling command-line tools as described in the official documentation, then run xcode-select --install solves this problem for me.

Worked for me as well, however, after removing it, a window to immediately popped up complaining about git and asked me to install the command line tools so I didn't even need to run xcode-select --install (which always yields "use Software Update" anyways)

After accepting that it was all good.
macOS: 10.15.2

You can open the dialog above by running git --version, for example, on the command line.

I don't know if it helps- but I'm finding myself in the following loop:

node-gyp fails
delete command line tools
install command line tools
node-gyp works
later macos/xcode requests an update
node-gyp stops fails (this takes a while to notice because yarn agressively caches)

And repeat.
For now I'm biting the bullet and installing the whole 8GB shabang.

Uninstalling command-line tools as described in the official documentation, then run xcode-select --install solves this problem for me.

you are good

I installed the old node version and all going well after it
brew install node@10
before it, I deleted the previous one and make a clean install of v10

This worked for me....
uninstall XCode Command Line tools by deleting
 /Library/Developer/CommandLineTools/
reinstall XCode CLI
sudo xcode-select --install
intall gyp
npm install -g node-gyp
Also see -
https://github.com/nodejs/node-gyp/blob/HEAD/macOS_Catalina.md
https://github.com/nodejs/node-gyp#on-macos

- node-gyp fails
- delete command line tools
- install command line tools
- node-gyp works
- later macos/xcode requests an update
- node-gyp fails (this takes a while to notice because yarn agressively caches)

I am in the exact same loop as @thomasmichaelwallace, with three separate systems, all having the same MacOS (10.15.2) / node (12.14.0) versions.
As soon, as the update "Command Line Tools for XCode 11.3" is installed, node-gyp stops working.

$ sudo rm -rf $(xcode-select -print-path)
$ xcode-select --install

Fixed it for me on Mac OS X Catalina 10.15.2

If xcode has been installed, and command line tools also installed
try  xcode-select -r   reset to the default command line tools path.

None of this is working for me. I am passing the acid test with flying colours but trying to install using the following command:
yarn global add gatsby-cli
and still getting all the gyp errors.
warning "gatsby-cli ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>
warning Error running install script for optional dependency: "/Users/darrylwright/.config/yarn/global/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/darrylwright/.config/yarn/global/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using<EMAIL_ADDRESS>node-pre-gyp info using<EMAIL_ADDRESS>| darwin | x64
node-pre-gyp info check checked for \"/Users/darrylwright/.config/yarn/global/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v79-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v79-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v79-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(node-v79 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v79-darwin-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp info find Python using Python version 2.7.17 found at<EMAIL_ADDRESS>gyp info spawn<EMAIL_ADDRESS>gyp info spawn args [
gyp info spawn args   '/usr/local/Cellar/node/13.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/darrylwright/.config/yarn/global/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/Cellar/node/13.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/darrylwright/Library/Caches/node-gyp/13.5.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/Cellar/node/13.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/darrylwright/Library/Caches/node-gyp/13.5.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/darrylwright/.config/yarn/global/node_modules/fsevents',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
X(Boolean)
^~~~~~~~~~
../../nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \\\n                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:2762:37: note: passing argument to parameter 'isolate' here
  Local<Boolean> ToBoolean(Isolate* isolate) const;
                                    ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
X(bool, Boolean)
^~~~~~~~~~~~~~~~
../../nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \\\n                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:5688:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
  return v8::StringObject::New(value).As<v8::StringObject>();
                                         ~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
  return v8::StringObject::New(value).As<v8::StringObject>();
                                                           ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8'
    static void Initialize(v8::Handle<v8::Object> exports);
                           ~~~~^
../fsevents.cc:63:6: warning: field 'async_resource' will be initialized after field 'lockStarted' [-Wreorder]
   : async_resource(\"fsevents:FSEvents\"), lockStarted(false) {
     ^
In file included from ../fsevents.cc:82:
../src/constants.cc:89:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagNone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagNone));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:90:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMustScanSubDirs\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMustScanSubDirs));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:91:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUserDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUserDropped));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:92:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagKernelDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagKernelDropped));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:93:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagEventIdsWrapped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagEventIdsWrapped));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:94:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagHistoryDone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagHistoryDone));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:95:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagRootChanged\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagRootChanged));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:96:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMount\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMount));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:97:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUnmount\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUnmount));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:98:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemCreated\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemCreated));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../fsevents.cc:82:
../src/constants.cc:99:11: error: no matching member function for call to 'Set'
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemRemoved\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRemoved));
  ~~~~~~~~^~~
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/darrylwright/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/13.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:305:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command \"/usr/local/Cellar/node/13.5.0/bin/node\" \"/usr/local/Cellar/node/13.5.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/darrylwright/.config/yarn/global/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/darrylwright/.config/yarn/global/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64\" \"--napi_version=5\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/darrylwright/.config/yarn/global/node_modules/fsevents
gyp ERR! node -v v13.5.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/Users/darrylwright/.config/yarn/global/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node --module_name=fse --module_path=/Users/darrylwright/.config/yarn/global/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64 --napi_version=5 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/darrylwright/.config/yarn/global/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:305:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1028:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 19.2.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/13.5.0/bin/node\" \"/Users/darrylwright/.config/yarn/global/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/darrylwright/.config/yarn/global/node_modules/fsevents
node-pre-gyp ERR! node -v v13.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp build --fallback-to-build --module=/Users/darrylwright/.config/yarn/global/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node --module_name=fse --module_path=/Users/darrylwright/.config/yarn/global/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64 --napi_version=5 --node_abi_napi=napi' (1)"```

The solution of @rrrix solved the problem, but now xcode won't open anymore. Any ideas?

"Using request for node-pre-gyp https download"    ---->.  I think this is some kind of fall back.  So install request lib  for Python on your local machine. Perhaps this helps.....(on my machine it works with Catalina a 10.15.2).

Unlocking as per #2056, but please try and understand your issue in a little more depth before posting here.
Most issues relating to node-gyp that people experience are due to a mismatch between your version of Node.js and the addon that you're trying to compile. Try upgrading your addon to support your newer Node.js (if the addon has updates available) or try downgrading your Node.js to match what the addon supports.

I have troubles installing node-gyp using yarn. node-gyp is a dependency of bleno.
I came here from Catalina istructions, the acid test pass, but i still have errors, someone can help?
`[2/4] 🚚  Fetching packages...
info<EMAIL_ADDRESS>The platform "darwin" is incompatible with this module.
info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
[-/5] ⠈ waiting...
[-/5] ⠈ waiting...
[5/5] ⠈ vuepress
[4/5] ⠈ xpc-connection
warning Error running install script for optional dependency: "/Users/myusername/src/workspace/project-iot/node_modules/xpc-connection: Command failed.
 System Darwin 19.4.0
gyp ERR! command "/Users/myusername/.nvm/versions/node/v10.13.0/bin/node" "/Users/myusername/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/myusername/src/workspace/project-iot/node_modules/xpc-connection
success Saved lockfile.
✨  Done in 336.04s.`

I think xcode-select --install attaches itself to the node version you have installed at the time. So if you're using nvm, asdf or similar, the install process will be linked to the current Node version, and will break if you switch to another version.

Hi all,
Mac OS 10.15.4 here.
Acid test: passed.
But i still have this error at install libraries :
`

<EMAIL_ADDRESS>install /Users/emanuele/Angular/demo1/node_modules/watchpack/node_modules/fsevents
node-gyp rebuild

SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:9:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
error Never include this file directly.  System Darwin 19.4.0
gyp ERR! command "/usr/local/Cellar/node/13.12.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/emanuele/Angular/demo1/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v13.12.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

<EMAIL_ADDRESS>install /Users/emanuele/Angular/demo1/node_modules/webpack-dev-server/node_modules/fsevents
node-gyp rebuild

SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:9:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
error Never include this file directly.  System Darwin 19.4.0
gyp ERR! command "/usr/local/Cellar/node/13.12.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/emanuele/Angular/demo1/node_modules/webpack-dev-server/node_modules/fsevents
gyp ERR! node -v v13.12.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/watchpack/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
`

Please check https://github.com/fsevents/fsevents

I think @cclauss read only the end of the log... the problem still node-gyp, i try to downgrade node as 12 but still not working. I'm using brew.
I'm using xcode command line tool.
xcode-select version 2373.
node v12.16.1.

I looked at:
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:9:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.

I upgrade the lib but it still not works... seem a problem with the command line tool, i'm wrong?
The  install sometime work despite the errors

I find a workaround

mv /usr/local/include/block.h /usr/local/include/block.h.old

It come from here.
I don't know if i have destroy something moving it (i suppose not) but this fix all the error of compile node-gyp at the moment.

fsevents/fsevents#302

For those who have the acid tests passing but still getting failure building packages (node-gyp and ffi) I've done the following steps to fix it:
I've reinstalled python 2 (it also reinstalls python 3) and updated the python paths to python3:
brew reinstall python@2
which python
npm config set python /usr/bin/python

Why use legacy Python at all?  It is end of life.  Why not...
brew reinstall python
npm config set python $(which python3)

Like
https://github.com/nodejs/node-gyp/issues/1927#issuecomment-566567281
https://github.com/nodejs/node-gyp/issues/1927#issuecomment-567863961
This keeps coming back when doing software updates on Catalina. The pkgutil --packages | grep CL output just goes blank. Only removing the command line tools works, but that triggers the loop.

I tried everything installed Xcode complete, (8Gb and about half an hour of who knows what that monster does under the hood), did all steps required, but never got through the acid test...
Just updated python and told npm to use it as @cclauss mentioned, and that was it.
Danke Claus!

This worked for me without having to install the full XCode:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

At this point, the UI pops up and reinstalls the CLT:

...
3. Then run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Thanks a bunch mkellsy, that command solved it for me @ (Catalina 10.15.4)
No need to reinstall Xcode or nothing else.

iOS+Mac developer here: my Xcode toolchain was fine for my day-to-day work, but I was also failing both of these tests:
/usr/sbin/pkgutil --packages | grep CL
/usr/sbin/pkgutil --pkg-info com.apple.pkg.CLTools_Executables

Same as https://github.com/nodejs/node-gyp/issues/1927#issuecomment-618950907, a simple removal of /Library/Developer/CommandLineTools and re-install at the command-line has things working again.
(I suspect that somewhere along the line, Catalina removed these packages from its installed packaged list, but kept its content.)

install xcode :)

It is 7.6GB

Just dropping a quick note that having BOTH Python@2 and<EMAIL_ADDRESS>via homebrew was causing this error to occur for me, after upgrading to Catalina.
Removing Python@2 allowed me to rebuild.

Node-gyp got broken after the installation of the full Xcode package from App Store. Steps mentioned in https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md#The-acid-test didn't help. Wait for some updates

I get the error about "No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'", etc. when installing node-sass which has a dependency that needs node-gyp.
Here's what I'm running:
$ sw_vers
ProductName:  Mac OS X
ProductVersion: 10.15.5
BuildVersion: 19F101

$ /usr/sbin/pkgutil --packages | grep CLTools

$ which git
/usr/bin/git

$ git --version
git version 2.24.3 (Apple Git-128)

$ which clang
/usr/bin/clang

$ clang --version
Apple clang version 11.0.3 (clang-1<IP_ADDRESS>)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

$ xcode-select -version
xcode-select version 2373.

$ xcode-select -print-path
/Library/Developer/CommandLineTools

I prefer not to install all of XCode. Thanks!

Which version of node-gyp?

5.0.5
Here's the console output:
$ yarn install
yarn install v1.22.4
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
[5/5] 🔨  Building fresh packages...
[1/8] ⠐ fsevents
[-/8] ⠐ waiting...
[6/8] ⠐ cypress
[4/8] ⠐ node-sass
warning Error running install script for optional dependency: "/Users/russ/Projects/XXX/client/node_modules/@quasar/app/node_modules/webpack-dev-server/node_modules/fsevents, /Users/russ/Projects/XXX/client/node_modules/fsevents: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/russ/Projects/XXX/client/node_modules/fsevents
Output:
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>
gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp info find Python using Python version 2.7.16 found at \"/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python\"
...snipped for brevity...
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/russ/.nodenv/versions/13.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Darwin 19.5.0
gyp ERR! command \"/Users/russ/.nodenv/versions/13.2.0/bin/node\" \"/Users/russ/.nodenv/versions/13.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/russ/Projects/XXX/client/node_modules/fsevents
✨  Done in 193.64s.

node-gyp v7 should solve the gyp: No Xcode or CLT version detected!issue.

I tried installing node-gyp v7 directly but was unsuccessful:
$ yarn add node-gyp@7
yarn add v1.22.4
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning node-gyp ><EMAIL_ADDRESS>request has been deprecated, see https://github.com/request/request/issues/3142
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
[5/5] 🔨  Building fresh packages...
[1/2] ⡀ fsevents
warning Error running install script for optional dependency: "/Users/russ/Projects/XXX/client/node_modules/@quasar/app/node_modules/webpack-dev-server/node_modules/fsevents, /Users/russ/Projects/XXX/client/node_modules/fsevents: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/russ/Projects/XXX/client/node_modules/fsevents
Output:
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp info find Python using Python version 2.7.16 found at \"/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python\"
...snipped for brevity...
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/russ/.nodenv/versions/13.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:350:16)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! System Darwin 19.5.0
gyp ERR! command \"/Users/russ/.nodenv/versions/13.2.0/bin/node\" \"/Users/russ/.nodenv/versions/13.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/russ/Projects/XXX/client/node_modules/fsevents
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v7.0.0
gyp ERR! not ok"

Node.js 13 and Python 2 are both end of life.  Please upgrade to supported software.

Sounds like an issue with xcode command line tool installation. Could this be a solution? https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt

Sorry<EMAIL_ADDRESS>installs fine without the "No receipt" messages in other JS projects. The main project that I'm working on has some dependency that causes older version of Python and node-gyp to be installed. I'll need to address my problem with that team. Thanks!

Just dropping a quick note that having BOTH Python@2 and<EMAIL_ADDRESS>via homebrew was causing this error to occur for me, after upgrading to Catalina.
Removing Python@2 allowed me to rebuild.

Now that makes sense.  This has been happening to me every time I get a new update.  It's really frustrating.  Next time I try, I'm going to set the path so the system installed version of python are chosen and see if that works:
PATH=/usr/bin:$PATH npm rebuild

How do I know which version of node-gyp is being used?
I installed node-gyp globally, but I'm getting the same errors.
It's so confusing because as an end-user of npm packages I should know of node-gyp. I don't know which npm package I did install is using an old version of node-gyp. I don't even know if that reasoning made sense even...
Am cry!

Look for output like:
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
... or ...
gyp ERR! node -v v13.2.0
gyp ERR! node-gyp -v v7.0.0

I have a project using node-gyp 5 (not direct dependency, but further down the tree). Is there a way to make this work by using just the CLT, and not having to install the full Xcode?

This worked for me without having to install the full XCode:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

At this point, the UI pops up and reinstalls the CLT:

This worked for me.
macOS Catalina 10.15.5 (19F101)

This worked for me.

Install full Xcode
Open Xcode and the CLT will install
Then run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

This uses the full Xcode CLT and node-gyp works.

Worked for me.

I get a lot of Directory not empty errors when executing the sudo rm -rf $(xcode-select -print-path) step.

You must be typing the command wrong or something...
sudo is super user mode and -f is force so this should be a highly destructive command.

@cclauss Negative. I copy pasted it, in and out of the terminal. Not that it matters too much anymore; after it happening twice, I proceeded to install Xcode tools first, then Xcode. For partial posterity's sake, there's some indication that the files may have been in use (I quit out of everything obvious, who knows?), but that it isn't reported as such when attempting to delete.
➜  Developer sudo rm -rf $(xcode-select -print-path)
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/PassKitUIFoundation.framework: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer/Platforms: Directory not empty
rm: /Applications/Xcode.app/Contents/Developer: Directory not empty

This worked for me.

Install full Xcode
Open Xcode and the CLT will install
Then run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

This uses the full Xcode CLT and node-gyp works.

Worked for me.

This worked for me

This worked for me without having to install the full XCode:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

At this point, the UI pops up and reinstalls the CLT:

This worked for me.
macOS Catalina 10.15.5 (19F101)

This worked for me, 10.15.5 (19F101)

this solution worked for me

[ ![Screenshot 2020-07-10 at 8 59 58 AM](https://user-images.githubusercontent.com/61705417/87113402-c637a680-c28b-11ea-82b4-4598b71d589c.png) ](url)

This worked for me without having to install the full XCode:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

At this point, the UI pops up and reinstalls the CLT:

This worked for me.
macOS Catalina 10.15.5 (19F101)

This worked for me, 10.15.5 (19F101)

same, worked for me. it threw an error at the end but it worked afterwards:
❯❯ /usr/sbin/pkgutil --packages | grep CLTools
com.apple.pkg.CLTools_Executables
com.apple.pkg.CLTools_SDK_macOS1015
com.apple.pkg.CLTools_SDK_macOS1014
com.apple.pkg.CLTools_macOS_SDK

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

worked for me, thanks 👍

This worked for me without having to install the full XCode:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

At this point, the UI pops up and reinstalls the CLT:

This worked for me.
macOS Catalina 10.15.5 (19F101)

This works well. But I find I have to do this every time I update my MacOS. Does anybody know why?

I don't understand why not simply reinstall Command Line Tools? It is not necessary to remove the directory '/Library/Developer/CommandLineTools'.

Why is this closed? It is still a TERRIBLE user experience.  I downloaded the whole gigantic xcode, installed it, only to find that it still didn't work, which finally brought me here, which forced me to delete some part of the thing I installed in order to reinstall it a different way? This should not be closed until gyp finds a more reliable way to determine if the tools it needs are installed.

@ideasculptor Something is broken with xcode-select and OS X upgrades.  I have a work machine where every time I upgrade OS X it loses the xcode-select files and I have to reinstall. I don't know if this is Apple's fault or something IT has broken (I will have to pay attention the next time I upgrade my personal machine), but it sure is frustrating. It happened again to me this week on an incremental system update. I visited here three times before it finally registered that the last time I rebooted my machine it took forever to restart (clear sign of big changes on next reboot), and that I needed to run it again.
As far as I recall, XCode doesn't install the CLI automatically. You always have to run that. Some people prefer using homebrew. Before this problem, I tended to steer people to xcode because I always found the configuration capture on homebrew to be a bit flimsy. People would sneak in 3rd party dependencies without documenting them, and that tended to stop once most of us were using xcode-select instead.

I don't know if this is Apple's fault

It is :-(
sudo rm -rf $(xcode-select -print-path) # Enter root password. No output is normal.
sudo rm -rf /Library/Developer/CommandLineTools # Enter root password.
xcode-select --install

Have you tried that advice recently, on a broken system.
Because there are quite a few of us who have been saying for years that it doesn’t work, and it gets a bit old seeing it copy pasted everywhere.   Only (re)installing the pkg file fixes it.

Yes.  I have.  Every instance of macOS is "broken" after installing an macOS update and this solution works consistently.

@jdmarshall, it works consistently for me.  I'm' not running the full-fat XCode though.

I just had the problem described in this issue and the suggested fix worked for me:
sudo rm -rf $(xcode-select -print-path)
xcode-select --install

My surmise is that gyp is testing for the existence of the developer tools in the receipt database, that a macOS update removes those entries for some reason, and that reinstalling the command-line tools restores the missing receipts allowing gyp to work again.

gyp is testing for the existence of the developer tools in the receipt database

Nice insight!!  What would be a better way to test for the presence of xcode-select?

Happens to me on each major release of OS X
sudo rm -rf $(xcode-select -print-path)

xcode-select --install

Can we agree that this happening on every MacOS update is...not expected? 10 years ago I would've maybe said, fine, once in a while my system gets updated, so I guess I have to go through this hassle again...but nowadays, receiving updates, either for MacOS or the CommandLineTools, happens quite often and with Big Sur we can expect it to happen even more often, because the update process will get faster and easier AFAIK.
This is such a bad experience.

The error message is just plain wrong. Maybe a small percentage of people actually doesn't have CommandLineTools installed.
The error message is bloated with stuff no one cares about.
The error message doesn't even give you a link to this github issue or to any other of the hundred of discussions with possible solutions on the internet

Getting this error feels like I'm doing something wrong, or my dependencies are doing something wrong, or my machine doing something wrong. But instead, it's node-gyp doing something wrong, by acting like Xcode or the CommandLineTools doesn't exist. But if I execute xcode-select --install, it says it's already installed.
Xcode is in a superposition between being installed and not being installed, where node-gyp makes the observation that it isn't, while we observe it is. This is Schrödinger's Xcode and I don't like any of that quantum mechanics in my general relativity code, so please fix this, thanks.

@nnmrts we look forward to your pull request.

I pass the acid test, yet still cannot build anything that requires gyp on 10.15.6.
I have gone thru all three of fixes to no avail.

@nnmrts we look forward to your pull request.

This eventual pull request would solve which issue exactly? Because this one here is still closed.

I get an error when i try

xcode-select --install

cannot install this soft because it is not available now from update server  ( translated by me sorry )
any fix ?

and why on earth node_modules are related to xcode ? i neved understanded this.
on linux & windows yarn & npm work very well without it. on my mac i have to install xcode and 10go just to use them
thanks

Is anyone else running into this message when they try to run xcode-select --install ?
It worked fine until the update for Catalina 10.15.6 was pushed to my work computer, but now I get this error when trying to install via command line.

https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_12/Command_Line_Tools_for_Xcode_12.dmg should be current.

The full list, which should include the current XCode select and any betas, will be here:
https://developer.apple.com/download/more/

@jdmarshall, are you suggesting to download the file from Apple's developer website manually, instead of via CLI?

I posted the solution in https://github.com/nodejs/node-gyp/issues/1927#issuecomment-640737645 and not sure why people didn't take a look. I got a DOWN vote with that comment too.

I posted the solution in #1927 (comment) and not sure why people didn't take a look. I got a DOWN vote with that comment too.

because that isn't 'the' solution.  Plenty of us have experienced that no amount of uninstalling and reinstalling the command line tools fixed anything at all until we manually removed files from the disk.  It would seem that those of us who already had xcode and command line tools installed from some previous version of OS X had extra steps that were required to clean up whatever mess was causing the problems, even after installing the latest version of everything.
sudo rm -rf $(xcode-select -print-path)
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

I posted the solution in #1927 (comment) and not sure why people didn't take a look. I got a DOWN vote with that comment too.

because that isn't 'the' solution. Plenty of us have experienced that no amount of uninstalling and reinstalling the command line tools fixed anything at all until we manually removed files from the disk. It would seem that those of us who already had xcode and command line tools installed from some previous version of OS X had extra steps that were required to clean up whatever mess was causing the problems, even after installing the latest version of everything.
sudo rm -rf $(xcode-select -print-path)
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

except this solution doesn't work for some people after last catalina update, and the only working solution that we found is to donwload it manually from apple website.

@lalli-flores There's a failure mode where xcode-select refuses to install itself because it's already installed.  Even if the install directory doesn't exist.
Even if you delete the install directory.

@jdmarshall After you remove the directories from your Mac via:
sudo rm -rf $(xcode-select -print-path)
sudo rm -rf /Library/Developer/CommandLineTools

I found that it is also useful to run:
xcode-select -r

Now everything is pristine, and if you do:
xcode-select -p

It will really complain that nothing is there.

I posted the solution in #1927 (comment) and not sure why people didn't take a look. I got a DOWN vote with that comment too.

because that isn't 'the' solution. Plenty of us have experienced that no amount of uninstalling and reinstalling the command line tools fixed anything at all until we manually removed files from the disk. It would seem that those of us who already had xcode and command line tools installed from some previous version of OS X had extra steps that were required to clean up whatever mess was causing the problems, even after installing the latest version of everything.
sudo rm -rf $(xcode-select -print-path)
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

except this solution doesn't work for some people after last catalina update, and the only working solution that we found is to donwload it manually from apple website.

I did the manual download and I still can't get it working, and our pipelines are failing now too presumably because the build machines are using Catalina too

@suzck There were a couple cases where it was recommended you reset the xcode-select path. Which version of xcode CLI
did you try to install manually?

There's a failure mode where xcode-select refuses to install itself because it's already installed. Even if the install directory doesn't exist. Even if you delete the install directory.

Same here.
Damn catalina...

I just had the same issue which is getting quite repetitive every time I update macOS. This worked for me:

Run:

sudo rm -rf /Library/Developer/CommandLineTools

Download Command Line Tools for Xcode 12 from https://developer.apple.com/download/more/ . Install it manually.

I'm just metoo'ing on this issue as requested in the macOS_Catalina.md. Did all the steps, including manually deleting the developer tool directories and downloading the .dmg from Apple web site for XCode 12 command-line tools. Acid test runs correctly yet I get the build error.
Unfortunately I'm trying to work with a large open source project that hasn't apparently adopted node-gyp v7 yet so I'm stuck here.

@tonimelismasalesforce does the solution proposed in #2235 work?

I'd like confirmation from someone that #2235 (adding an xcode-select --reset before the xcode-select --install) is an actual improvement over the current suggested steps.

Downloading it directly from https://developer.apple.com/download/more/ worked for me: Command Line Tools for Xcode 12.2 beta 3

Uninstalling and reinstalling works, but I have to do this quite often and xCode is pretty large and takes ages to reinstall, there must be a better way than having to reinstall it every few days

Yes. #2235

This is what worked for me: downloading the non-beta Command Line Tools for Xcode 12, deleting the existing directories, installing it and then running:
sudo xcode-select --switch /Library/Developer/CommandLineTools

Part of the confusion is that every version seems to use a different path. The non-beta path is as above, while the more recent ones are under either /Applications/Xcode.app or /Applications/Xcode-beta.app. Here's a script to select the existing directory automatically:
names=("/Library/Developer/CommandLineTools" "/Applications/Xcode-beta.app/Contents/Developer" "/Applications/Xcode.app/Contents/Developer")

for name in ${names[*]}; do
  if [[ -d $name ]]
  then
    echo Selecting $name
    sudo xcode-select --switch $name
  fi
done

#2244 which just landed seem works for me.

Sounds like an issue with xcode command line tool installation. Could this be a solution? https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt

This worked for me.

#1927 (comment)

Sounds like an issue with xcode command line tool installation. Could this be a solution? https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt

This worked for me.

worked for me too

Sounds like an issue with xcode command line tool installation. Could this be a solution? https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt

Started getting "No receipt for 'com.apple.pkg.CLTools_Executables' found at '/' -npm" after opening Terminal following the Catalina 10.15.7 supplemental update - this solution fixed it great.

Just wanted to comment that following the instructions for "I did all that" (https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md#i-did-all-that-and-the-acid-test-still-does-not-pass--) resulted in a broken XCode installation.
The XCode.app file has been removed, but the App Store thinks it's still installed, so doesn't present an option to re-install.

Just wanted to comment that following the instructions for "I did all that" (https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md#i-did-all-that-and-the-acid-test-still-does-not-pass--) resulted in a broken XCode installation.
The XCode.app file has been removed, but the App Store thinks it's still installed, so doesn't present an option to re-install.

OK. Thanks. The goal is NOT to install full Xcode. Perhaps we needed to sudo on the xcode-select --install command. Did you look in "Software Update" to see if there was something there?

Yep, only Xcode.
For my Mac users, I am directing them to install full Xcode. Our team finds the instructions much easier then this https://developer.apple.com/library/archive/technotes/tn2339/_index.html.
Note that many of our users will not go to the Apple developer site. However they can tolerate a command here and there.

This works for me after installing the Command Line Tools for Xcode from apple(https://developer.apple.com/downloads/index.action). I have this issue every time the command line tools was updated by Mac's system software update.

OK. Thanks. The goal is NOT to install full Xcode. Perhaps we needed to sudo on the xcode-select --install command. Did you look in "Software Update" to see if there was something there?

Yep, only Xcode.
For my Mac users, I am directing them to install full Xcode. Our team finds the instructions much easier then this https://developer.apple.com/library/archive/technotes/tn2339/_index.html.
Note that many of our users will not go to the Apple developer site. However they can tolerate a command here and there.

This works for me after installing the Command Line Tools for Xcode from apple(https://developer.apple.com/downloads/index.action). I have this issue every time the command line tools was updated by Mac's system software update.

Should this check still be in place for folks on Big Sur?
It seems that every so often when there's an update from Mac this comes back.
I followed the documentation to get me back into a good state. You can find my output and steps here.

This worked for me.

Install full Xcode
Open Xcode and the CLT will install
Then run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

This uses the full Xcode CLT and node-gyp works.

get sign

I had this error and tried nearly everything except installing the whole XCode 7Go package.
I installed cmake.js, a node-gyp alternative and I can now npm install...
 npm install --ignore-scripts seems to work also in my case but apparently it doesn't install everything.

the acid test fails every time because https://github.com/nodejs/node-gyp/raw/master/macOS_Catalina_acid_test.sh does not exist (404). The command should be:
curl -sL https://raw.githubusercontent.com/nodejs/node-gyp/main/macOS_Catalina_acid_test.sh | bash


Cannot mount docker socket inside a container w/ Docker 0.10.0

Hi !
I originally posted that on this boot2docker issue : https://github.com/boot2docker/boot2docker/issues/334 but it seems to be Docker 0.10 related issue.
My goal : running https://github.com/jwilder/docker-gen inside a container.
Constraint : docker-gen have to communicate with the running docker daemon thru the Unix socket (seems like no TCP support yet and i want to use unix socket). So when running my "docker-gen" container, i'll mount de docker socket from/to /var/run/docker.sock using the "-v" option.
Problem : while Docker 0.9.x seems to handle this, docker 0.10 have some drawbacks. These drawbacks differs from host OS to another, but all cannot make it happen :-(
Given i'll use this simple Dockerfile, and run a container with the socket mounting inside, a run of docker ps will show my running container, for reproduction :
FROM debian:jessie
MAINTAINER<EMAIL_ADDRESS>RUN apt-get update && apt-get install -y wget
RUN wget https://get.docker.io/builds/Linux/x86_64/docker-latest -O /bin/docker
RUN chmod +x /bin/docker

A quick listing of my current tests/reproductions :

From the linked issue on b2d :

boot2docker 0.8.0 w/ docker 0.10.0 : error message around /var/run/docker.sock not existing when running "docker run -v..."
boot2docker 0.7.0 w/ docker 0.9.0 : all works fine

From my experiments :

Centos 6.5 x64 Vagrant box (Linux vagrant-centos65.vagrantup.com 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux) w/ docker 0.9.0 from stable EPEL : OK

$ ls -l /var/run/docker.sock
srw-rw---- 1 root docker 0 May  4 11:47 /var/run/docker.sock
[vagrant@vagrant-centos65 ~]$ sudo docker run -v /var/run/docker.sock:/var/run/docker.sock -ti debian-docker bash
root@2195744ff81d:/# ls -l /var/run/docker.sock
srw-rw---- 1 root 496 0 May  4 11:47 /var/run/docker.sock
root@2195744ff81d:/# docker ps && echo OK
<.. docker ps stuff ..>
OK

Same Centos w/ docker 0.10.0 from EPEL-testing repo : NOK (error related to LXC)

[vagrant@vagrant-centos65 ~]$ sudo docker run -v /var/run/docker.sock:/var/run/docker.sock -ti debian-docker bash
lxc-start: No such file or directory - failed to mount '/var/run/docker.sock' on '/usr/lib64/lxc/rootfs///var/run/docker.sock'
lxc-start: failed to setup the mount entries for 'cf2ce352452d885dbfe7fa0bd4d955e91eac9ffc7eac5ebcb169bc9eafdbdb16'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'cf2ce352452d885dbfe7fa0bd4d955e91eac9ffc7eac5ebcb169bc9eafdbdb16'

My Ubuntu 13.04 x64 VPS (Linux dadou-server 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:24:59 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux) w/ docker 0.10.0 : NOK (launch the container with soccer mounted, but only as a standard file)

dadou@dadou-server:~$ docker run -v /var/run/docker.sock:/var/run/docker.sock -ti --privileged jessie-docker bash
root@7278907deb54:/# docker ps
2014/05/04 12:15:09 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
root@7278907deb54:/# ls -l /var/run/docker.sock
-rwxr-xr-x 1 root root 0 May  4 12:15 /var/run/docker.sock

Am I missing something new introduced in Docker v0.10 (i saw some bin-mount moved to namespace and cgroups stuff) ?

I don't know if this is related but if I do something like this:
docker run --rm -v /sys:/sys ubuntu:14.04 echo "Hello world"

I get this error:
FATA[0006] Error response from daemon: Cannot start container
11f5fbf544acb3ce9a40e6f0cacea1fa229f24797d626365c9327ca5e03153c9:
[8] System error: "/mnt/tmp/docker/aufs/mnt/
11f5fbf544acb3ce9a40e6f0cacea1fa229f24797d626365c9327ca5e03153c9/sys"
cannot be mounted because it is located inside "/sys"

This is the output of mount -l on that system if that helps:
/dev/mapper/ubuntu-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /boot type ext2 (rw)
/dev/mapper/ubuntu-var on /var type ext4 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
/dev/sdb1 on /mnt/tmp type ext4 (rw,_netdev)

Maybe the last line mounting stuff to /mnt/tmp is the issue here? Not sure, what to try next... any help would be appreciated!

@Kosta-GitHub are you using docker 1.6.1? because this sounds like one of the security fixes in that release blocking that mount. (I don't have the full details on the CVE's patched in the release, so can't give you the details as to why it's blocked).

Yes, this is with docker 1.6.1 ...

@Kosta-GitHub this issue is currently being discussed, see https://github.com/docker/docker/issues/13097.


Updating bootstrap.sh to build the result of a Github PR

If $BUILDBOX_PULL_REQUEST is anything other than false, we'll now check out the result of that merge into its destination branch. Works for PRs inside the project repo, or from an external fork. Not tested for anything other than Github.

Hmm… so this will test against refs/[pr]/merge each time regardless of what the commit was that triggered the build.
If the PR was updated in the mean time, the build would be for different commit (and the wrong commit would have their build commit status changed).
Hrmm…

Yeah fair point. I guess ideally if we detect an attempt to schedult a build for a PR which was already being build, I'd want the running build to be cancelled. Similar behaviour to the 'skip for multiple commits on the same branch'?

Maybe I'm completley wrong, but can we do this:
buildbox-run "git fetch origin +refs/pull/$BUILDBOX_PULL_REQUEST/merge:"
buildbox-run "git reset --hard origin/+refs/pull/$BUILDBOX_PULL_REQUEST/merge:"
buildbox-run "git checkout -qf \"$BUILDBOX_COMMIT\""

Or something?

Is there some docs about this somewhere?

Not that I've read. I'm just reconstructing this from how Travis does it.
Re: the above comment:
buildbox-run "git fetch origin +refs/pull/$BUILDBOX_PULL_REQUEST/merge:"

Gets the imaginary result of a merge from the PR into the destination branch, and sticks it in a temp branch called FETCH_HEAD.
buildbox-run "git reset --hard origin/+refs/pull/$BUILDBOX_PULL_REQUEST/merge:"

Doesn't work :( you can do git reset --hard FETCH_HEAD, but it has the same effect as the current "git checkout -qf FETCH_HEAD" (except with the git reset we're merging the changes onto the local develop branch, as opposed to a separate detached branch you get when you git checkout).
buildbox-run "git checkout -qf \"$BUILDBOX_COMMIT\""

Does work. But just rewinds you to the commit on the PR branch, not the result of that commit being merged to the destination.

Hey @samw-bilue, thanks for figuring out all the things! I've moved your changes (tweaked a little) into https://github.com/buildbox/agent/pull/74. My version doesn't handle testing merge commits, but at least it's a step in the right direction! :smile:


added travis-ci and code climate integration

other changes:

enhanced .gitignore
added travis-ci badge
added code climate badge
added Gemfile
added rake dependency
added test-unit dependency
some IDE recommendations

Thanks for this!


tar/export: Correctly set size and entry type for denormal links

Fixes https://discussion.fedoraproject.org/t/rebasing-from-container-registry/35356
(This needs unit tests I know, but right now our content set is
a manually-generated fixed tarball, and I have some patches in the
work to improve the test suite)

(This was a consequence of a merge conflict between the two distinct symlink PRs)


SIGPIPE in ktls_send_ctrl_message on Linux

As #16399 already mentions, there are issues when OpenSSL is used with a socket on a Linux system. The user app will crash with SIGPIPE, when the remote side terminates the socket.
The preferred solution seems to be overwriting read/writesocket.
In the case of kTLS and in particular ktls_send_ctrl_message this doesn't seem to apply, as the function calls sendmsg() directly.
Since include/internal/ktls.h already differentiates between FreeBSD and Linux, it would be possible (or necessary?) to add MSG_NOSIGNAL to the sendmsg call in the Linux code path.
If this is a valid solution, I'd be happy to provide the according, trivial PR.
If this solution simplifies the actual problem, a solution is needed, so that the app doesn't crash with SIGPIPE.

If https://github.com/openssl/openssl/issues/16399#issuecomment-1785714556 would be implemented, the Linux version of ktls_send_ctrl_message() still calls sendmsg() unconditionally:
https://github.com/openssl/openssl/blob/260d97229c467d17934ca3e2e0455b1b5c0994a6/include/internal/ktls.h#L322-L350
ktls_send_ctrl_message() is called from sock_write()
https://github.com/openssl/openssl/blob/260d97229c467d17934ca3e2e0455b1b5c0994a6/crypto/bio/bss_sock.c#L139-L174

If the proposal is implemented then you could set what flags you want to pass via a ctrl. The ktls_send_ctrl_message function would then have to be modified to use those flags, rather than calling sendmsg with a 0 for the last argument.


Error push.gcm.registerNative

Hi
I try to register device for push notification :
push.on('registration', (data) => {
console.log("device token ->", data.registrationId);
//TODO - send device token to server
var handle = data.registrationId;
console.log("client",client.push);
client.push.gcm.registerNative(handle).then(function(data){
alert("success");
},function(error){
alert(error);
console.log(error);
});
  });

But i get error :
Failed to load resource: the server responded with a status of 404 (Not Found)
http://xxxxx.azurewebsites.net/push/registrations?platform=gcm&d…c_xKbaFUy8ydAsInGIILF6iP-egXoItelHrORhrOjHh8QFkJowQfcat6k_wEVVmiVMvnGXp0_x

Just to follow up - this is indicative that the push endpoint is not configured through the Push option on the Azure Portal in your App Service.


New Version: Astronomer.Astro version 1.24.0

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Hi @+Validation-Defender-ErrorBinary-Validation-ErrorError-Analysis-TimeoutError-Hash-MismatchError-Installer-AvailabilityInternal-ErrorInternal-Error-Dynamic-ScanInternal-Error-ManifestInternal-Error-URLManifest-AppsAndFeaturesVersion-ErrorManifest-Installer-Validation-ErrorManifest-Validation-ErrorPossible-DuplicatePullRequest-ErrorURL-Validation-ErrorValidation-DomainValidation-Executable-ErrorValidation-Hash-Verification-FailedValidation-Missing-DependencyValidation-Merge-ConflictValidation-No-ExecutablesValidation-Installation-ErrorValidation-Shell-ExecuteValidation-Unattended-FailedPolicy-Test-1.2Policy-Test-2.3Policy-Test-2.3Validation-Forbidden-URL-ErrorValidation-Unapproved-URLValidation-RetryNeeds-Author-Feedback[0],
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 836.)

Automatic Validation ended with: >  Installation failed with exit code -1978335187 >

2024-02-27 12:48:33.361 [CLI ] Installer [X64,portable,Unknown,en-US] not applicable: Machine is not compatible with X64 >
2024-02-27 12:48:48.870 [FAIL] Installer failed security check. Url: https://github.com/astronomer/astro-cli/releases/download/v1.24.0/astro_1.24.0_windows_386.exe Result: 0x80004005   (Automated response - build 836.)

Hi @+Validation-Defender-ErrorBinary-Validation-ErrorError-Analysis-TimeoutError-Hash-MismatchError-Installer-AvailabilityInternal-ErrorInternal-Error-Dynamic-ScanInternal-Error-ManifestInternal-Error-URLManifest-AppsAndFeaturesVersion-ErrorManifest-Installer-Validation-ErrorManifest-Validation-ErrorPossible-DuplicatePullRequest-ErrorURL-Validation-ErrorValidation-DomainValidation-Executable-ErrorValidation-Hash-Verification-FailedValidation-Missing-DependencyValidation-Merge-ConflictValidation-No-ExecutablesValidation-Installation-ErrorValidation-Shell-ExecuteValidation-Unattended-FailedPolicy-Test-1.2Policy-Test-2.3Validation-CompletedValidation-Forbidden-URL-ErrorValidation-Unapproved-URLValidation-RetryNeeds-Author-Feedback[0],
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 843.)

Automatic Validation ended with:   Installation failed with exit code -1978335187  > 2024-02-28 01:07:48.694 [CLI ] Installer [X64,portable,Unknown,en-US] not applicable: Machine is not compatible with X64  > 2024-02-28 01:08:09.392 [FAIL] Installer failed security check. Url: https://github.com/astronomer/astro-cli/releases/download/v1.24.0/astro_1.24.0_windows_386.exe Result: 0x80004005   (Automated response - build 843.)


Changing the storage strategy

Continuation from the discussion in #29
So we're thinking about changing the storage strategy from "wiki" to "dedicated branch.

This will require a major version bump (v3)
I think the idea would be that we specify the branch in the actions settings. If not set, we would use a default name (python-coverage-comment-action-data ?) we would create an empty branch (as in: git checkout --orphan <branch>, git reset --hard)
Optionnal (but if we're rewriting this code anyway) We could always push 3 files : the svg itself (so that will make the private repo work as well) and a json containing details of the coverage run (a floating point coverage percentage with 2 decimal digits so we wouldn't loose too much precision when saying if the rate increase or decreased) and a json for the shields endpoint.
We would post all the URLs when the action runs:

the url to the image directly (and mention that it's the solution for private repos)
the url to the dynamic endpoint (and mention that it cannot have a dynamic color, it will always be the color you choose)
the url to the json endpoint (and mention that one can override parts of the style)
(and maybe the shields pages with the documentation)

When pushing the branch for the first time, it would be great to also push a README.md. Explain what this branch is, point to the action URL.
In the documentation, be clear that this action will push to a dedicated branch. This means users may have to tweak existing workflow if those workflow trigger on all branches pushes ?

So @kieferro are you interested in giving it a go ? Or do you prefer if I do ? Or any other solution (I'm a pair programming fan, but I don't know if our timezones match :D )

I'm happy to take it over, but it may take me a bit to finish, depending on how I find time for it.
So if you want it done quickly or especially like to take it over, you can do it too.
I think pair programming would have the advantage that we wouldn't have a code review on a large scale. If the location given in your profile is still correct, then time zones shouldn't be a problem. That said, I don't know if we'll manage to agree on a time that suits us both.
Would you have any ideas on how pair programming could be arranged in detail?

What would be a good wait to chat with you to setup a date and exchange a link to a videoconferencing tool ? I'm on twitter, reddit, keybase, signal, etc (though I may not have notifications enabled everywhere)

I have sent you an email with contact information.


Fix #5 Use render prop implementation

It changes the implementation to use render props instead. It breaks the existing API.
Once it's merged, we need to update gh-pages accordingly.

Hi @solodynamo, could you please take time to review this? Thank you so much!

Thanks for the PR, will surely review by night.
On Feb 3, 2018 10:09 AM, "Divjot Singh"<EMAIL_ADDRESS>wrote:

Hi @solodynamo https://github.com/solodynamo, could you please take
time to review this? Thank you so much!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/solodynamo/react-c2c/pull/6#issuecomment-362779367,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQ4Pmow_iNA7xPh7lUtady3URIyzt7k0ks5tQ-L0gaJpZM4R2_ux
.

Awesome PR , Thanks  !

Thank you so much @solodynamo for merging the PR so promptly!


Revert SdkInit command changes in develop branch

What does this PR do?
This PR reverts changes made with following PRs:

https://github.com/DataDog/dd-sdk-android/pull/1447
https://github.com/DataDog/dd-sdk-android/pull/1399

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

Codecov Report

Merging #1455 (d1d969e) into develop (5594382) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #1455      +/-   ##
===========================================
- Coverage    82.03%   81.97%   -0.06%
===========================================
  Files          363      363
  Lines        12991    12981      -10
  Branches      2165     2162       -3
===========================================
- Hits         10657    10641      -16
- Misses        1674     1681       +7
+ Partials       660      659       -1

Impacted Files
Coverage Δ

...g/android/rum/internal/domain/scope/RumRawEvent.kt
82.21% <ø> (+0.28%)
:arrow_up:

...droid/rum/internal/domain/scope/RumSessionScope.kt
91.01% <100.00%> (+0.90%)
:arrow_up:

.../android/rum/internal/monitor/DatadogRumMonitor.kt
79.90% <100.00%> (-0.94%)
:arrow_down:

... and 12 files with indirect coverage changes


Locate person by Region

Implement Locate Person By Region feature
Format: find REGION [PERSON_INDEX]
Required information:

Region person is residing in
Region specified should be a valid region

Examples:

find Central
find NorthEast 3

Currently it displays the region directly on the person card. I think shouldn't need to find where a person is residing using a command now?