kiwicom / margarita

[not actively maintained] Mobile and Web application implementing Kiwi.com Tequila API
https://margarita.kiwi.com/
MIT License
208 stars 42 forks source link

yarn install fails on node v12 #917

Closed zbycz closed 5 years ago

zbycz commented 5 years ago

I've tried running yarn install in the monorepo root, but it fails on building some native modules (gyp).

To Reproduce Steps to reproduce the behavior:

  1. clone the repo (master branch)
  2. choose node v12.6.0
  3. run yarn install
  4. See error:
[-/17] ⠂ waiting...
[-/17] ⠂ waiting...
[9/17] ⠄ grpc
[-/17] ⠄ waiting...
error /Users/pavel/dev/margarita/node_modules/grpc: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build --library=static_library
Arguments: 
Directory: /Users/pavel/dev/margarita/node_modules/grpc
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.12.0
node-pre-gyp info using node@12.6.0 | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/Users/pavel/dev/margarita/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node" (not found)
node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.19.0/node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp http 404 https://node-precompiled-binaries.grpc.io/grpc/v1.19.0/node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.19.0/node-v72-darwin-x64-unknown.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for grpc@1.19.0 and node@12.6.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc/v1.19.0/node-v72-darwin-x64-unknown.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.6.0 | darwin | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.6.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/Users/pavel/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/pavel/dev/margarita/node_modules/grpc/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/pavel/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/pavel/.node-gyp/12.6.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/pavel/.node-gyp/12.6.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/pavel/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/pavel/.node-gyp/12.6.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/pavel/dev/margarita/node_modules/grpc',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.6.0 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
...

../ext/channel.cc:292:56: error: too few arguments to function call, expected 2, have 1
  int try_to_connect = (int)info[0]->Equals(Nan::True());
                            ~~~~~~~~~~~~~~~            ^
/Users/pavel/.node-gyp/12.6.0/include/node/v8.h:2572:3: note: 'Equals' declared here
  V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
  ^
/Users/pavel/.node-gyp/12.6.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
1 error generated.
make: *** [Release/obj.target/grpc_node/ext/channel.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/pavel/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:203:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/Users/pavel/.nvm/versions/node/v12.6.0/bin/node" "/Users/pavel/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/pavel/dev/margarita/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/pavel/dev/margarita/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/pavel/dev/margarita/node_modules/grpc
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/Users/pavel/.nvm/versions/node/v12.6.0/bin/node /Users/pavel/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/pavel/dev/margarita/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/pavel/dev/margarita/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/pavel/dev/margarita/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:203:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.6.0
node-pre-gyp ERR! command "/Users/pavel/.nvm/versions/node/v12.6.0/bin/node" "/Users/pavel/dev/margarita/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/pavel/dev/margarita/node_modules/grpc
node-pre-gyp ERR! node -v v12.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok 

~/dev/margarita on master $

Remarks