Pulsar: Nodejs- Pulsar-Client NPM issues

Created on 26 Apr 2020  路  8Comments  路  Source: apache/pulsar

Describe the bug
Attempt to install pulsar-client from npm, was not successful: _node-pre-gyp WARN Tried to download(404): https://pulsar.apache.org/docs/en/client-libraries-cpp/libpulsar-v1.1.0-node-v64-linux-x64.tar.gz_
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)

To Reproduce
Steps to reproduce the behavior:

npm install pulsar-client

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Desktop (please complete the following information):

  • OS: [e.g. iOS]

Additional context
Add any other context about the problem here.

triagweek-18 typbug

Most helpful comment

Thanks for the response. I was able to include cpp in docker file in a multi stage build as suggested by @sijie and it worked but the challenge is the image size after all is bigger. I am currently considering to use Dockerslim

All 8 comments

@nkurihar are you and your team able to help with this issue?

Waiting anxiously for this fix. Thank you

Currently, pulsar-client-node isn't built and published pre-built binaries in release flow. If you use, you should install C++ library, and build binary in "falling back to source compile with node-gyp" step(automatically run).

See details at https://pulsar.apache.org/docs/en/client-libraries-node/#requirements

Currently, C++ library isn't support Windows platform. Is your environment Windows? If so, you can't use pulsar-client-node correctly now.
https://pulsar.apache.org/docs/en/client-libraries-cpp/#supported-platforms

I got the same error on linux. Including this in a pre-build step when running from docker is the challege.

node-pre-gyp warning log is always shown when installing(because pre-gyp binaries isn't uploaded).
Here is an example.

If you can't install, check Pulsar C++ library and g++.

root@4d65efd5b3e5:/# curl -sLO https://archive.apache.org/dist/pulsar/pulsar-2.5.1/DEB/apache-pulsar-client.deb
root@4d65efd5b3e5:/# curl -sLO https://archive.apache.org/dist/pulsar/pulsar-2.5.1/DEB/apache-pulsar-client-dev.deb
root@4d65efd5b3e5:/# apt-get install ./apache-pulsar-client.deb ./apache-pulsar-client-dev.deb
root@4d65efd5b3e5:/# npm install pulsar-client
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

> [email protected] install /node_modules/pulsar-client
> 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-v72-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/node_modules/pulsar-client/build'
  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  AR(target) Release/obj.target/../node-addon-api/src/nothing.a
  COPY Release/nothing.a
  CXX(target) Release/obj.target/Pulsar/src/addon.o
  CXX(target) Release/obj.target/Pulsar/src/Message.o
  CXX(target) Release/obj.target/Pulsar/src/MessageId.o
  CXX(target) Release/obj.target/Pulsar/src/Authentication.o
  CXX(target) Release/obj.target/Pulsar/src/Client.o
  CXX(target) Release/obj.target/Pulsar/src/Producer.o
  CXX(target) Release/obj.target/Pulsar/src/ProducerConfig.o
  CXX(target) Release/obj.target/Pulsar/src/Consumer.o
  CXX(target) Release/obj.target/Pulsar/src/ConsumerConfig.o
  CXX(target) Release/obj.target/Pulsar/src/Reader.o
  CXX(target) Release/obj.target/Pulsar/src/ReaderConfig.o
  SOLINK_MODULE(target) Release/obj.target/Pulsar.node
  COPY Release/Pulsar.node
make: Leaving directory '/node_modules/pulsar-client/build'
npm WARN saveError ENOENT: no such file or directory, open '/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

+ [email protected]
added 122 packages from 130 contributors and audited 284 packages in 26.036s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Thanks for the response. I was able to include cpp in docker file in a multi stage build as suggested by @sijie and it worked but the challenge is the image size after all is bigger. I am currently considering to use Dockerslim

Currently running into the same, issue for windows 10 in VSCode. Is there a work around?

Currently running into the same, issue for windows 10 in VSCode. Is there a work around?

Currently, C++ library isn't supported on Windows platform.

Was this page helpful?
0 / 5 - 0 ratings