commit | fe1938118034214b02a1ff2116650d60f47dd9e2 | [log] [tgz] |
---|---|---|
author | Baodi Shi <wudixiaolongbao@icloud.com> | Sun Dec 04 14:28:21 2022 +0800 |
committer | GitHub <noreply@github.com> | Sun Dec 04 14:28:21 2022 +0800 |
tree | 6566132cc15f30eb037a994401b331b2c97f33eb | |
parent | 026154e4de7b70575351e4445eaa82f1aac77b3a [diff] |
Fix windows default download cpp client failed. (#257) ### Motivation https://github.com/apache/pulsar-client-node/issues/256 ### Modifications - Get local `arch` when the `arch` is empty. - Use `move` instead of `mv`
The Pulsar Node.js client can be used to create Pulsar producers and consumers in Node.js.
This library works only in Node.js 10.x or later because it uses the node-addon-api module to wrap the C++ library.
Note
These instructions are only available for versions after 1.8.0. For versions previous to 1.8.0, you need to install the C++ client first. Please switch to the corresponding version branch of this repo to read the specific instructions.
npm
npm install pulsar-client
yarn
yarn add pulsar-client
After install, you can run the examples.
The module uses node-pre-gyp to download the prebuilt binary for your platform, if it exists. These binaries are hosted on ASF dist subversion. The following targets are currently provided:
Format: napi-{platform}-{libc}-{arch}
darwin-arm64
systems are not currently supported, you can refer How to build
to build from source.
git clone https://github.com/apache/pulsar-client-node.git cd pulsar-client-node
Select the appropriate installation method from below depending on your operating system:
pkg/mac/build-cpp-deps-lib.sh pkg/mac/build-cpp-lib.sh
build-support/install-cpp-client.sh
curl
and 7z
):pkg\windows\download-cpp-client.bat
npm install --build-from-source