Node-rdkafka: unable to install on Mac Mojave

Created on 3 Oct 2019  路  9Comments  路  Source: Blizzard/node-rdkafka

Keep getting the same error like below:

../src/producer.cc:453:59: error: no matching member function for call to 'ToObject'
v8::Local header = v8Headers->Get(i)->ToObject();
~~~~~^~
../src/producer.cc:457:46: error: no matching member function for call to 'GetOwnPropertyNames'
v8::Local props = header->GetOwnPropertyNames();
~~^~~~~
5 warnings and 2 errors generated.
make: * [Release/obj.target/node-librdkafka/src/producer.o] Error 1
rm 11a9e3388a67e1ca5c31c1d8da49cb6d2714eb41.intermediate
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:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.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/lynhnn/flow/dcc/dcc-feed/node_modules/node-rdkafka
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
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.

stale

Most helpful comment

This issue is happening to me with node 12.16.1 too, anyone knows how to fix it without downgrading node? Thanks!

All 9 comments

@lynhnn I had this issue, what version of Node are you running? I had to drop down to v10.14.2. Try that and it should be fine.

@joshrichards37 Thank you, I had this issue and downgrading node resolved it. Any plans to fix the compatibility with future versions of node?

Any plans to fix the compatibility with future versions of node?

Can you try with the latest version v2.7.4?

@iradul looks like its working ok with latest version, thanks

I'm getting this same or a similar error with node-rdkafka v2.7.4 and node v13.1.0. It installs correctly with v12.12.0

5 errors generated.
make: *** [Release/obj.target/node-librdkafka/src/binding.o] Error 1
rm 11a9e3388a67e1ca5c31c1d8da49cb6d2714eb41.intermediate
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: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 18.7.0
gyp ERR! command "/usr/local/Cellar/node/13.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd <REDACTED>/node_modules/node-rdkafka
gyp ERR! node -v v13.1.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
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/<REDACTED>/.npm/_logs/2019-11-20T02_11_11_249Z-debug.log

1 warning and 5 errors generated.
make: * [Release/obj.target/node-librdkafka/src/binding.o] Error 1
rm 11a9e3388a67e1ca5c31c1d8da49cb6d2714eb41.intermediate
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/luxuze/.nvm/versions/node/v13.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/Users/luxuze/.nvm/versions/node/v13.6.0/bin/node" "/Users/luxuze/.nvm/versions/node/v13.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/luxuze/agora/argus/node_modules/node-rdkafka
gyp ERR! node -v v13.6.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
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/luxuze/.npm/_logs/2020-01-21T02_36_11_832Z-debug.logSame Error with mdchambers

Node 13 is not currently supported.

This issue is happening to me with node 12.16.1 too, anyone knows how to fix it without downgrading node? Thanks!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings