Skip to content

node-gyp rebuild not working on MacOS Catalina Beta without reinstalling CommandLineTools #1861

Closed
@nnmrts

Description

@nnmrts
  • 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...
Verbose output (from npm or node-gyp):
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!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions