profile
viewpoint

Ask questionsTypeError: '>=' not supported between instances of 'tuple' and 'str'

<!-- Thank you for reporting an issue. The more information you can give us, the better the chance we can fix your problem.

This issue tracker is for issues with node-gyp, if you have an issue installing a specific module, please file an issue on that module's issue tracker (npm issues modulename). -->

  • Node Version: node v10.15.3 npm 6.4.1
  • Platform: Darwin AdamsVoBookPro3 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64
  • Compiler:
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
  • Module: electron-rebuild

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

An unhandled error occurred inside electron-rebuild
Traceback (most recent call last):
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
    sys.exit(gyp.script_main())
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
    return main(sys.argv[1:])
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
    return gyp_main(args)
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 532, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2215, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 802, in Write
    self.WriteCopies(spec['copies'], extra_outputs, part_of_all)
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1145, in WriteCopies
    env = self.GetSortedXcodeEnv()
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1885, in GetSortedXcodeEnv
    additional_settings)
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1618, in GetSortedXcodeEnv
    additional_settings)
  File "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1529, in _GetXcodeEnv
    if XcodeVersion() >= '0500' and not env.get('SDKROOT'):
TypeError: '>=' not supported between instances of 'tuple' and 'str'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189: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 "/Users/adam/.nvm/versions/node/v10.15.3/bin/node" "/Users/adam/Projects/Personal/insomnia/packages/insomnia-app/node_modules/.bin/node-gyp" "rebuild" "--target=3.1.13" "--arch=x64" "--dist-url=https://electronjs.org/headers" "--build-from-source" "--module_name=node_libcurl" "--module_path=/Users/adam/Projects/Personal/insomnia/packages/insomnia-libcurl/node_modules/insomnia-node-libcurl/lib/binding" "--host=https://github.com/JCMais/node-libcurl/releases/download" "--remote_path=./v2.0.0-alpha.0-1/"
gyp ERR! cwd /Users/adam/Projects/Personal/insomnia/packages/insomnia-libcurl/node_modules/insomnia-node-libcurl
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok

Failed with exit code: 1

</details>

<!-- Any further details -->

If I update the comparison on the line here to the following, it works:

  xcode_version, _ = XcodeVersion()

  if xcode_version >= '0500' and not env.get('SDKROOT'):

However, I'm not sure if it's supposed to work like that or not.

nodejs/node-gyp

Answer questions cclauss

This was fixed in the last few weeks... Can you please try with a more current release?

useful!

Related questions

Error: `gyp` failed with exit code: 1 at ChildProcess.onCpExit hot 3
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
Breaks with VS2019 installed hot 1
Github User Rank List