Blizzard / Blizzard/node-rdkafka
node-gyp rebuild error inside gitlab pipeline in node12
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 403
- PR merge metrics
- No merged PRs in 30d
Description
Hey guys, I'm trying to install node-rdkafka using a gitlab pipeline, the pipeline is able to generate the package fine with node 8, node 10 but not with node 12. I'm able to compile using my notebook, a vm or inside a docker only inside the gitlab pipeline the error occurs:
node-rdkafka@2.10.1 install /builds/xx/adapter-kafka/node_modules/node-rdkafka
node-gyp rebuild
Warning: Ignoring extra certs from /etc/ssl/certs/ca-certificates.crt, load failed: error:02001002:system library:fopen:No such file or directory
Warning: Ignoring extra certs from /etc/ssl/certs/ca-certificates.crt, load failed: error:02001002:system library:fopen:No such file or directory
gyp: Call to 'node ./util/get-env.js BUILD_LIBRDKAFKA 1' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:259:16)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 3.10.0-1160.53.1.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /builds/xx/node_modules/node-rdkafka
gyp ERR! node -v v12.22.10
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-rdkafka@2.10.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-rdkafka@2.10.1 install script.
The gitlab pipeline is using a Centos 7 image with the latest node 12 with all dependencies requested by node-rdkafka, if I change for node 10 the package is generated correctly.
I also tried with the latest rdkafka 2.12.0 and I have the same error.
OS: Centos7
Node Version: 12.22.10
NPM Version: 6.14.16
Node-Gyp: 8.4.1
node-rdkafka version: 2.10.1 or 2.12.0
Contributor guide
Research direction
Start by comparing the CentOS 7 GitLab pipeline environment with the working Node 8 and Node 10 builds, then inspect binding.gyp and util/get-env.js around the reported node-gyp command. Done means node-rdkafka 2.10.1 or 2.12.0 installs successfully in the Node 12.22.10 pipeline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, kafka, node.js
- Domain
- backend, build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100