profile
viewpoint

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.0.103.151.1~4/RELEASE_X86_64 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 '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!

</details>

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...).

nodejs/node-gyp

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.

useful!

Related questions

Error: `gyp` failed with exit code: 1 at ChildProcess.onCpExit hot 4
gyp ERR! stack Error: `make` failed with exit code: 2 hot 2
npm install error on windows 10 hot 2
Fails on every npm install on macOS Mojave hot 2
node-gyp: EPERM: operation not permitted, read hot 2
Visual Studio finder is doing a case-sensitive path check hot 2
node-gyp rebuild failed hot 1
Node gyp build fails on node v12.1.0 hot 1
node-pre-gyp build fail error while installing with `npm install` or `npm install -d` hot 1
Is this an Issue with MACOS catalina? hot 1
gyp ERR! stack Error: `make` failed with exit code: 2 hot 1
Is this an Issue with MACOS catalina? hot 1
Is this an Issue with MACOS catalina? hot 1
Not able to build in osx 10.14.2 with java 10.0.1 hot 1
TypeError: '>=' not supported between instances of 'tuple' and 'str' hot 1
source:https://uonfu.com/
Github User Rank List