Ask questionsnode-gyp rebuild not working on MacOS Catalina Beta without reinstalling CommandLineTools

  • Node Version: v8.16.1 & v12.7.0
  • Platform: Darwin macbook 19.0.0 Darwin Kernel Version 19.0.0: Tue Jul 23 01:19:36 PDT 2019; root:xnu-6153. x86_64
  • Compiler: Apple clang version 11.0.0 (clang-1100.0.33.5) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
  • Module: any module...

<details><summary>Verbose output (from npm or node-gyp):</summary>

No receipt for '' found at '/'.

No receipt for '' found at '/'.

No receipt for '' found at '/'.

gyp: No Xcode or CLT version detected!


Yes, I know, it's obvious that there are some bugs on a beta OS, but I just wanted to share the solution because I couldn't find anything by googling.

To run node-gyp, you need to do this: xcode-select --install first, but if you already installed the command line tools in the past, this command will just output:

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Using "Software Update" as suggested, won't fix this problem. You have to uninstall the command line tools first by deleting this folder: /Library/Developer/CommandLineTools reference

After doing that, you need to run xcode-select --install again and everything should work now.

However, even though node-gyp now finds your command line tools, it will still fail if you use a node version higher than v8.16.1, so consider downgrading to that momentarily (by using nvm for example...).


Answer questions nnmrts

@cclauss Should fix it, but I'm not sure how people that used the workaround described here would be able to reverify this, because you basically have to downgrade your command line tools, or better said "anti-upgrade" them. I think this workaround is a one-way thing, or at least a very hard to revert change.

Also, the group of users who ran and and will run into this issue is probably pretty small. My suggestion is to leave this issue open until Catalina is finally released, then close it.

EDIT: To avoid misunderstandings, I'm not saying that there are "not enough" users of neither the MacOS Beta, nor Python 3, nor node-gyp version 5.0.0 to 5.0.3. But I think being a user of all three things in this specific timeframe is pretty rare.

Nano Miratus nnmrts @pumpncode Vienna, Austria he/him/his, making stuff and coding things
Github User Rank List