node-rdkafka icon indicating copy to clipboard operation
node-rdkafka copied to clipboard

npm install not working

Open taran-1898 opened this issue 6 years ago • 12 comments

Environment Information

  • OS [e.g. Mac, Arch, Windows 10]: Ubuntu 18.04
  • Node Version [e.g. 8.2.1]: 10.17.0
  • NPM Version [e.g. 5.4.2]: 6.13.6
  • node-rdkafka version [e.g. 2.3.3]: 2.7.*
  • node-gyp version : 5.0.5 Steps to Reproduce npm install node-rdkafka

Additional context

gyp ERR! build error gyp ERR! stack Error: not found: make gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12) gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19) gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29) gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21) gyp ERR! System Linux 5.0.0-37-generic 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 /home/taran/Documents/investwell/investlogic/node_modules/node-rdkafka gyp ERR! node -v v10.17.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm WARN [email protected] requires a peer of eslint-plugin-promise@>=3.5.0 but none is installed. You must install peer dependencies yourself. 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.

taran-1898 avatar Jan 28 '20 14:01 taran-1898

Do you have development tools installed? Looks like it can't find make in your $PATH

codeburke avatar Jan 28 '20 16:01 codeburke

How do i fix that ? Never faced this issue on any package installation on this path.

taran-1898 avatar Jan 29 '20 06:01 taran-1898

Install works fine here.

chughes87 avatar Feb 07 '20 21:02 chughes87

Install works fine here.

What version of node are you using ?

taran-1898 avatar Feb 10 '20 09:02 taran-1898

is this issue solved? same error here...

vincentywx avatar Feb 18 '20 00:02 vincentywx

find a solution...

export LDFLAGS=-L/usr/local/opt/openssl/lib && export CPPFLAGS=-I/usr/local/opt/openssl/include && rm -rf node_modules && npm install

Mac environment

vincentywx avatar Feb 18 '20 00:02 vincentywx

I'm using node 12

chughes87 avatar Feb 18 '20 02:02 chughes87

Im struggling to get the package to install to anyone have any suggestions on how i can get the make to compile correctly?

./src/binding.cc:133:12: error: no matching member function for call to 'Set'
  exports->Set(Nan::New("errorCodes").ToLocalChecked(), errorCodes);
  ~~~~~~~~~^~~
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:144:12: error: no matching member function for call to 'Set'
  exports->Set(Nan::New("topic").ToLocalChecked(), topicConstants);
  ~~~~~~~~~^~~
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:146:12: error: no matching member function for call to 'Set'
  exports->Set(Nan::New("err2str").ToLocalChecked(),
  ~~~~~~~~~^~~
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:149:12: error: no matching member function for call to 'Set'
  exports->Set(Nan::New("features").ToLocalChecked(),
  ~~~~~~~~~^~~
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
../src/binding.cc:154:3: warning: 'AtExit' is deprecated: Use the three-argument variant of AtExit() or AddEnvironmentCleanupHook() [-Wdeprecated-declarations]
  AtExit(RdKafkaCleanup);
  ^
*/********/Library/Caches/node-gyp/13.2.0/include/node/node.h:702:1: note: 'AtExit' has been explicitly marked deprecated here
NODE_DEPRECATED(
^
*/********/Library/Caches/node-gyp/13.2.0/include/node/node.h:99:20: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                   ^
../src/binding.cc:160:12: error: no matching member function for call to 'Set'
  exports->Set(Nan::New("librdkafkaVersion").ToLocalChecked(),
  ~~~~~~~~~^~~
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
*/********/Library/Caches/node-gyp/13.2.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,

chazguerrero avatar Mar 12 '20 23:03 chazguerrero

For the original poster, apt-get install build-essential.

For that last poster... a tiny bit of information about your build env and node version would be helpful. I think you might be using an unsupported node version, maybe try https://github.com/Blizzard/node-rdkafka/pull/759

For the intermediate ones... I think those are all different issues... would need build env details to know what is happening. os, what build/compiler tools are (or are not?) installed.

sam-github avatar Mar 13 '20 04:03 sam-github

I was on v13.11 but dropped to v12 and it works. Thanks for looking into it for me! Hopefully it doesn’t break on v14 when it launches

chazguerrero avatar Mar 13 '20 05:03 chazguerrero

On Mac 10.15.4 (node v14.2.0), I get it node-gyp to compile as a requirement for node-rdkafka. I am not sure if you need all of the following. Thanks for the hints.

  • un-installed python2 that I installed before with brew (??)
  • brew install librdkafka
  • npm install node-rdkafka -g (does not work without the -g)
  • npm link node-rdkafka (to link the global module)

fortran01 avatar May 19 '20 16:05 fortran01

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

stale[bot] avatar Aug 18 '20 03:08 stale[bot]