apache / apache/pulsar-client-node

Looks like the pulsar-client-node can not run with the current pulsar master code

Open
#161 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
164
Forks
98
PR merge metrics
No merged PRs in 30d

Description

**Motivation**

Install the pulsar-client-node with latest pulsar-client-cpp failed.
error logs:

```
make: Entering directory '/pulsar/node_modules/pulsar-client/build'
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
AR(target) Release/obj.target/../node-addon-api/nothing.a
COPY 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: No such file or directory
#include
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Pulsar.target.mk:124: Release/obj.target/Pulsar/src/addon.o] Error 1
make: Leaving directory '/pulsar/node_modules/pulsar-client/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:376:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.10.25-linuxkit
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/pulsar/node_modules/pulsar-client/build/Release/libpulsar.node" "--module_name=libpulsar" "--module_path=/pulsar/node_modules/pulsar-client/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /pulsar/node_modules/pulsar-client
gyp ERR! node -v v14.17.0
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 '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/pulsar/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/pulsar/node_modules/pulsar-client/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess. (/pulsar/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:376:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1055:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 5.10.25-linuxkit
node-pre-gyp ERR! command "/usr/bin/node" "/pulsar/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /pulsar/node_modules/pulsar-client
node-pre-gyp ERR! node -v v14.17.0
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/pulsar/node_modules/pulsar-client/build/Release/libpulsar.node --module_name=libpulsar --module_path=/pulsar/node_modules/pulsar-client/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN enoent ENOENT: no such file or directory, open '/pulsar/package.json'
npm WARN pulsar No description
npm WARN pulsar No repository field.
npm WARN pulsar No README data
npm WARN pulsar No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pulsar-client@1.3.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pulsar-client@1.3.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! /root/.npm/_logs/2021-06-07T14_02_09_069Z-debug.log
```

---

We should have a CI to run the tests with the latest pulsar code to check the compatibility./

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the npm install failure with the latest pulsar-client-cpp, then inspect src/addon.cc and src/Message.h for the missing pulsar/c/message.h dependency. Review the existing CI and test configuration to determine how compatibility is checked. Done means CI runs the client tests against the latest Pulsar code and detects compatibility failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, nodejs
Domain
ci-cd, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.