Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-gyp rebuild failing #16

Closed
MattIPv4 opened this issue Jun 16, 2019 · 9 comments
Closed

node-gyp rebuild failing #16

MattIPv4 opened this issue Jun 16, 2019 · 9 comments

Comments

@MattIPv4
Copy link

Hi there,

When attempting to install integer on macOS Catalina (10.15), it fails during the node-gyp rebuild process.

Whilst I would assume therefor that this is most likely an issue with node-gyp in macOS Catalina at this stage during to it being a beta OS, but was wondering if anyone here knows a solution to this or if pre-built binaries could be packaged instead so that node-gyp isn't required during installation.

npm i integer

> [email protected] install /Users/mattcowley/Downloads/test/node_modules/integer
> node-gyp rebuild

make: *** No rule to make target `../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', needed by `Makefile'.  Stop.
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/Cellar/node/10.10.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/mattcowley/Downloads/test/node_modules/integer
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/mattcowley/.npm/_logs/2019-06-16T13_25_50_492Z-debug.log
@MattIPv4
Copy link
Author

@tereio
Copy link

tereio commented Dec 5, 2019

Hi all - I'm getting the same on Mojave.

@tereio
Copy link

tereio commented Dec 5, 2019

[email protected] install integer
node-gyp rebuild

Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 50, in
sys.exit(gyp.script_main())
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 554, in script_main
return main(sys.argv[1:])
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 547, in main
return gyp_main(args)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2215, in GenerateOutput
part_of_all=qualified_target in needed_targets)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 802, in Write
self.WriteCopies(spec['copies'], extra_outputs, part_of_all)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1145, in WriteCopies
env = self.GetSortedXcodeEnv()
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1885, in GetSortedXcodeEnv
additional_settings)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1616, in GetSortedXcodeEnv
additional_settings)
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1527, 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 (/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 18.7.0
gyp ERR! command "/usr/local/Cellar/node@10/10.17.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/bbrew2/Projects/nike/ae/tools/nike_forge_dev/backend/node_modules/better-sqlite3/node_modules/integer
gyp ERR! node -v v10.17.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok

@tereio
Copy link

tereio commented Dec 5, 2019

This looks to be a python3 oriented gyp build error: TypeError: '>=' not supported between instances of 'tuple' and 'str'

I'm currently attempting to build using 3.7.4 with gyp. Have you tested this yet?

@aminpaks
Copy link

aminpaks commented Jan 2, 2020

I finally made it work with Python v2.7 (latest Node v12.14.0, latest node-gyp v5.0.7)

@MattIPv4
Copy link
Author

MattIPv4 commented Jan 2, 2020

I finally made it work with Python v2.7

This issue is about macOS Catalina and using Python 3 🤔
Python 2 is now EOL and shouldn't be used.

@aminpaks
Copy link

aminpaks commented Jan 2, 2020

@MattIPv4 it's a long story, apparently there's an issue with node-gyp on npm. Npm ships an internal version of node-gyp (currently with v5.0.7) but the fix for Python3 is on node-gyp v6.0.1.

Also some people are trying to turn node-gyp to a js solution instead of using python. Read the full story here.

@cekvenich
Copy link

Let me know if this fixes it, before the install: npm i -g node-gyp@latest

@JoshuaWise
Copy link
Owner

This should be fixed with integer 3.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants