pulsar-client-node: npm install fails on MacOS

System Information

  • Operating System: MacOS Catalina 10.15.2
  • Node version: 12.13.1
  • node-gyp version: 6.1.0
  • C++ Client: 2.5.0 (brew install libpulsar)

Running npm install pulsar-client results in the following error:

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.1.0-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for pulsar-client@1.1.0 and node@12.13.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
  CXX(target) Release/obj.target/Pulsar/src/addon.o
In file included from ../src/addon.cc:20:
../src/Message.h:24:10: fatal error: 'pulsar/c/message.h' file not found
#include <pulsar/c/message.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/Pulsar/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/richturnbull/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/Users/richturnbull/.nvm/versions/node/v12.13.1/bin/node" "/Users/richturnbull/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/richturnbull/dev/es/pulsar/client/node_modules/pulsar-client/build/Release/libpulsar.node" "--module_name=libpulsar" "--module_path=/Users/richturnbull/dev/es/pulsar/client/node_modules/pulsar-client/build/Release" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/richturnbull/dev/es/pulsar/client/node_modules/pulsar-client
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/richturnbull/.nvm/versions/node/v12.13.1/bin/node /Users/richturnbull/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/richturnbull/dev/es/pulsar/client/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/Users/richturnbull/dev/es/pulsar/client/node_modules/pulsar-client/build/Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/richturnbull/dev/es/pulsar/client/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
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 19.2.0
node-pre-gyp ERR! command "/Users/richturnbull/.nvm/versions/node/v12.13.1/bin/node" "/Users/richturnbull/dev/es/pulsar/client/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/richturnbull/dev/es/pulsar/client/node_modules/pulsar-client
node-pre-gyp ERR! node -v v12.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/richturnbull/.nvm/versions/node/v12.13.1/bin/node /Users/richturnbull/.nvm/versions/node/v12.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/richturnbull/dev/es/pulsar/client/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/Users/richturnbull/dev/es/pulsar/client/node_modules/pulsar-client/build/Release --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN client@1.0.0 No description
npm WARN client@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pulsar-client@1.1.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pulsar-client@1.1.0 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/richturnbull/.npm/_logs/2020-04-17T11_38_18_780Z-debug.log

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 31 (6 by maintainers)

Most upvoted comments

Same here. I installed the cpp client first, but still same problem?

@nearzxide10

npm ERR! ld: library not found for -lpulsar
npm ERR! clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems clang doesn’t link the pulsar library yet. Temporally, you set LIBRARY_PATH environment variable to the libpulsar.dylib path like below.

export LIBRARY_PATH=$(brew --prefix)/lib${LIBRARY_PATH+:${LIBRARY_PATH}}
# or simply
export LIBRARY_PATH=$(brew --prefix)/lib

I think the root cause of this issue is below. I’ll try to fix it.

https://github.com/apache/pulsar-client-node/blob/d8d24eb5f563869ba0028b8a1ae8646601252a93/binding.gyp#L105-L108

Thanks, it works for me

@nearzxide10

npm ERR! ld: library not found for -lpulsar
npm ERR! clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems clang doesn’t link to the libpulsar library yet. Temporally, you set LIBRARY_PATH environment variable to the libpulsar path like below.

export LIBRARY_PATH=$(brew --prefix)/lib${LIBRARY_PATH+:${LIBRARY_PATH}}
# or simply
export LIBRARY_PATH=$(brew --prefix)/lib

I think the root cause of this issue is below. I’ll try to fix it. https://github.com/apache/pulsar-client-node/blob/d8d24eb5f563869ba0028b8a1ae8646601252a93/binding.gyp#L105-L108

don’t forget to do this step…

when I forget to run the step 2, I got the same issue…

image

this fixed me:

export LDFLAGS=-L/opt/homebrew/lib
export CFLAGS=-I/opt/homebrew/include
export CPPFLAGS=-I/opt/homebrew/include

My thought is that npm install should add everything I need… Once I figure out how to get this installed, I have to help other developers get it going. Nope im out.

brew install libpulsar and then npm install pulsar-client worked without any issues on macOS Catalina

nodeJs version : 16.15.1 npm version : 8.11.0 mac OS: 12.4 (M1 max)

I installed the cpp client first and export PULSAR_CPP_DIR… can’t npm install too

npm ERR! code 1
npm ERR! path /Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
npm ERR!   LIBTOOL-STATIC Release/nothing.a
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/addon.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/Message.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/MessageId.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/Authentication.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/Client.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/Producer.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/ProducerConfig.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/Consumer.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/ConsumerConfig.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/Reader.o
npm ERR!   CXX(target) Release/obj.target/Pulsar/src/ReaderConfig.o
npm ERR!   SOLINK_MODULE(target) Release/Pulsar.node
npm ERR! Failed to execute '/Users/jackliu/.nvm/versions/node/v16.15.1/bin/node /Users/jackliu/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.9
npm ERR! node-pre-gyp info using node@16.15.1 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client/build/Release/libpulsar.node" (not found)
npm ERR! node-pre-gyp http GET https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.6.2-node-v93-darwin-arm64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.6.2-node-v93-darwin-arm64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for pulsar-client@1.6.2 and node@16.15.1 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.6.2-node-v93-darwin-arm64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.15.1 | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.15.1 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.13 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/jackliu/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/jackliu/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/jackliu/Library/Caches/node-gyp/16.15.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/jackliu/Library/Caches/node-gyp/16.15.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/jackliu/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/jackliu/Library/Caches/node-gyp/16.15.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.15.1 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! In file included from ../src/addon.cc:23:
npm ERR! In file included from ../src/Producer.h:24:
npm ERR! In file included from /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client.h:23:
npm ERR! /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client_configuration.h:162:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
npm ERR! PULSAR_PUBLIC const unsigned int pulsar_client_configuration_get_stats_interval_in_seconds(
npm ERR!               ^~~~~~
npm ERR! 1 warning generated.
npm ERR! In file included from ../src/Client.cc:20:
npm ERR! In file included from ../src/Client.h:24:
npm ERR! In file included from /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client.h:23:
npm ERR! /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client_configuration.h:162:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
npm ERR! PULSAR_PUBLIC const unsigned int pulsar_client_configuration_get_stats_interval_in_seconds(
npm ERR!               ^~~~~~
npm ERR! 1 warning generated.
npm ERR! In file included from ../src/Producer.cc:20:
npm ERR! In file included from ../src/Producer.h:24:
npm ERR! In file included from /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client.h:23:
npm ERR! /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client_configuration.h:162:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
npm ERR! PULSAR_PUBLIC const unsigned int pulsar_client_configuration_get_stats_interval_in_seconds(
npm ERR!               ^~~~~~
npm ERR! 1 warning generated.
npm ERR! In file included from ../src/Consumer.cc:20:
npm ERR! In file included from ../src/Consumer.h:24:
npm ERR! In file included from /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client.h:23:
npm ERR! /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client_configuration.h:162:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
npm ERR! PULSAR_PUBLIC const unsigned int pulsar_client_configuration_get_stats_interval_in_seconds(
npm ERR!               ^~~~~~
npm ERR! ../src/Consumer.cc:151:7: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
npm ERR!       delete cTopics;
npm ERR!       ^
npm ERR!             []
npm ERR! ../src/Consumer.cc:144:30: note: allocated with 'new[]' here
npm ERR!       const char **cTopics = new const char *[topics.size()];
npm ERR!                              ^
npm ERR! ../src/Consumer.cc:180:22: warning: private field 'cConsumer' is not used [-Wunused-private-field]
npm ERR!   pulsar_consumer_t *cConsumer;
npm ERR!                      ^
npm ERR! 3 warnings generated.
npm ERR! In file included from ../src/ConsumerConfig.cc:20:
npm ERR! In file included from ../src/ConsumerConfig.h:24:
npm ERR! In file included from ../src/MessageListener.h:24:
npm ERR! In file included from /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client.h:23:
npm ERR! /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client_configuration.h:162:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
npm ERR! PULSAR_PUBLIC const unsigned int pulsar_client_configuration_get_stats_interval_in_seconds(
npm ERR!               ^~~~~~
npm ERR! 1 warning generated.
npm ERR! In file included from ../src/Reader.cc:21:
npm ERR! In file included from ../src/Reader.h:24:
npm ERR! In file included from /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client.h:23:
npm ERR! /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client_configuration.h:162:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
npm ERR! PULSAR_PUBLIC const unsigned int pulsar_client_configuration_get_stats_interval_in_seconds(
npm ERR!               ^~~~~~
npm ERR! ../src/Reader.cc:132:20: warning: private field 'cReader' is not used [-Wunused-private-field]
npm ERR!   pulsar_reader_t *cReader;
npm ERR!                    ^
npm ERR! 2 warnings generated.
npm ERR! In file included from ../src/ReaderConfig.cc:20:
npm ERR! In file included from ../src/ReaderConfig.h:27:
npm ERR! In file included from ../src/ReaderListener.h:24:
npm ERR! In file included from /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client.h:23:
npm ERR! /opt/homebrew/Cellar/libpulsar/2.10.0/include/pulsar/c/client_configuration.h:162:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
npm ERR! PULSAR_PUBLIC const unsigned int pulsar_client_configuration_get_stats_interval_in_seconds(
npm ERR!               ^~~~~~
npm ERR! 1 warning generated.
npm ERR! ld: library not found for -lpulsar
npm ERR! clang: error: linker command failed with exit code 1 (use -v to see invocation)
npm ERR! make: *** [Release/Pulsar.node] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/jackliu/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command "/Users/jackliu/.nvm/versions/node/v16.15.1/bin/node" "/Users/jackliu/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client/build/Release/libpulsar.node" "--module_name=libpulsar" "--module_path=/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client
npm ERR! gyp ERR! node -v v16.15.1
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/Users/jackliu/.nvm/versions/node/v16.15.1/bin/node /Users/jackliu/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/jackliu/Project/pulsar/pulsar_test/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.5.0
npm ERR! node-pre-gyp ERR! command "/Users/jackliu/.nvm/versions/node/v16.15.1/bin/node" "/Users/jackliu/Project/pulsar/pulsar_test/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/jackliu/Project/pulsar/pulsar_test/node_modules/pulsar-client
npm ERR! node-pre-gyp ERR! node -v v16.15.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:

It seems to be because libpulsar does not yet support the m1 architecture

seems to be very sensitive to npm version, updating npm to latest version fixed issues.

this is sort of black magic to me 😦

Uhm, I was able to install using node 12.16.2 but not 8 nor 10

brew install libpulsar didn’t worked for me, I’m getting the following error

> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.1.0-node-v64-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for pulsar-client@1.1.0 and node@10.17.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
Traceback (most recent call last):
  File "./gyp-mac-tool", line 611, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./gyp-mac-tool", line 30, in main
    exit_code = executor.Dispatch(args)
  File "./gyp-mac-tool", line 45, in Dispatch
    return getattr(self, method)(*args[1:])
  File "./gyp-mac-tool", line 248, in ExecFilterLibtool
    if not libtool_re.match(line) and not libtool_re5.match(line):
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/nothing.a] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2