hrsakai commented on issue #289: URL: https://github.com/apache/pulsar-client-node/issues/289#issuecomment-1414661671
You can download a binary file through a mirror instead of https://dist.apache.org/repos/dist/release/pulsar/pulsar-client-node/ by setting `npm_config_Pulsar_binary_host_mirror`. ``` # node-pre-gyp fetches <mirror url>/pulsar-client-node-{version}/napi-{platform}-{libc}-{arch}.tar.gz $ env npm_config_Pulsar_binary_host_mirror=<mirror url> npm install pulsar-client ``` If you want to fetch a binary file from local ``` # node-pre-gyp fetches <path>/pulsar-client-node-{version}/napi-{platform}-{libc}-{arch}.tar.gz $ env npm_config_Pulsar_binary_host_mirror=file://<path> npm install pulsar-client ``` Currently, npm config argument cant't be used because module_name of pulsar-client include uppercase letter. https://github.com/apache/pulsar-client-node/blob/v1.8.0/package.json#L60 ``` "binary": { "module_name": "Pulsar", ``` npm will use npm_config_**p**ulsar_binary_host_mirror for the environment variable name even if running `npm install pulsar-client --Pulsar_binary_host_mirror=<mirror url>`. https://github.com/mapbox/node-pre-gyp#download-binary-files-from-a-mirror -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
