Skip to content

Is this an Issue with MACOS catalina? #1927

Closed

Description

@joe-nano

EDITED FOR PEOPLE JUST GETTING HERE:

node-gyp v7 should solve these issues.

Please follow the steps in macOS_Catalina.md

sha3@1.2.3 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! I'M RUNNING XCODE 11.2beta
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! 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! sha3@1.2.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sha3@1.2.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
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.

Activity

  1. rvagg commented on Oct 16, 2019

    @rvagg
    Member

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

  2. joe-nano commented on Oct 16, 2019

    @joe-nano
    Author

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

  3. mkellsy commented on Oct 16, 2019

    @mkellsy

    I have the same issue

  4. rvagg commented on Oct 16, 2019

    @rvagg
    Member

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

  5. mkellsy commented on Oct 16, 2019

    @mkellsy

    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
    
  6. mkellsy commented on Oct 16, 2019

    @mkellsy

    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-1100.0.32.5)
    Target: x86_64-apple-darwin19.0.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin
    
  7. richardlau commented on Oct 16, 2019

    @richardlau
    Member

    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 #569.

  8. mkellsy commented on Oct 17, 2019

    @mkellsy

    Thanks that works. I will let my users know.

  9. cclauss commented on Oct 19, 2019

    @cclauss
    Contributor

    @joe-nano Can this issue be closed?

  10. dreamerblue commented on Oct 20, 2019

    @dreamerblue

    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.

    image

    Related source:

    # This function ported from the logic in Homebrew's CLT version check
    def CLTVersion():
    """Returns the version of command-line tools from pkgutil."""
    # pkgutil output looks like
    # package-id: com.apple.pkg.CLTools_Executables
    # version: 5.0.1.0.1.1382131676
    # volume: /
    # location: /
    # install-time: 1382544035
    # groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg-group com.apple.DevToolsNonRelocatableShared.pkg-group
    STANDALONE_PKG_ID = "com.apple.pkg.DeveloperToolsCLILeo"
    FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI"
    MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables"
    regex = re.compile('version: (?P<version>.+)')
    for key in [MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID]:
    try:
    output = GetStdout(['/usr/sbin/pkgutil', '--pkg-info', key])
    return re.search(regex, output).groupdict()['version']
    except:
    continue

    Is there a way to fix it without installing full XCode.app?

  11. cclauss commented on Oct 20, 2019

    @cclauss
    Contributor

    sudo xcodebuild -license accept

  12. dreamerblue commented on Oct 20, 2019

    @dreamerblue

    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
    
  13. naiba commented on Oct 21, 2019

    @naiba

    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.

  14. 168 remaining items

  15. kboedges commented on Oct 15, 2020

    @kboedges

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

  16. zoheiry commented on Oct 16, 2020

    @zoheiry

    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

  17. cclauss commented on Oct 16, 2020

    @cclauss
    Contributor

    Yes. #2235

  18. slikts commented on Oct 26, 2020

    @slikts

    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
  19. cclauss commented on Oct 26, 2020

    @cclauss
    Contributor

    #2244 which just landed works for me.

  20. mhusseini commented on Oct 29, 2020

    @mhusseini

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

  21. jrking365 commented on Oct 29, 2020

    @jrking365

    #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

  22. valeriejg commented on Nov 6, 2020

    @valeriejg

    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.

  23. aaroncraigongithub commented on Jan 15, 2021

    @aaroncraigongithub

    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.

    To re-install, I had to manually delete the Xcode.app file from /Applications.

  24. ohbeep commented on Jan 29, 2021

    @ohbeep

    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.

  25. armenzg commented on Feb 10, 2021

    @armenzg

    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.

  26. RunlaiDeng commented on Apr 14, 2021

    @RunlaiDeng

    This worked for me.

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

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

    get sign

  27. goya commented on Jun 4, 2021

    @goya

    i had this error when running it as a dependancy.

    once i installed it globally

    $ npm i -g node-gyp

    it worked fine. hope this helps someone who doesnt want to re-download xcode.

  28. ketsapiwiq commented on Aug 8, 2021

    @ketsapiwiq

    I had this error and tried 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.
  29. spiritcapsule commented on Jun 22, 2022

    @spiritcapsule

    the acid test (https://github.com/nodejs/node-gyp/blob/main/macOS_Catalina.md#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://github.com/raw/nodejs/node-gyp/main/macOS_Catalina_acid_test.sh | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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