seongjae-min commented on issue #409:
URL: 
https://github.com/apache/pulsar-client-node/issues/409#issuecomment-3758429643

   For anyone who encounters the following logs during `npm install`:
   
   ```
   #39 49.28 .../node_modules/pulsar-client install: node-pre-gyp ERR! install 
request to 
https://archive.apache.org/dist/pulsar/pulsar-client-node/pulsar-client-node-1.16.0/napi-linux-glibc-x64.tar.gz
 failed, reason:  
   #39 49.28 .../node_modules/pulsar-client install: node-pre-gyp WARN 
Pre-built binaries not installable for [email protected] and [email protected] 
(node-v137 ABI, glibc) (falling back to source compile with node-gyp) 
   #39 49.28 .../node_modules/pulsar-client install: node-pre-gyp WARN Hit 
error request to 
https://archive.apache.org/dist/pulsar/pulsar-client-node/pulsar-client-node-1.16.0/napi-linux-glibc-x64.tar.gz
 failed, reason:  
   
   ... after trying to local build as fallback ...
   
   #39 54.18 .../node_modules/pulsar-client install:   COPY Release/nothing.a
   #39 54.19 .../node_modules/pulsar-client install:   CXX(target) 
Release/obj.target/pulsar/src/addon.o
   #39 54.28 .../node_modules/pulsar-client install: In file included from 
../src/addon.cc:20:
   #39 54.28 .../node_modules/pulsar-client install: ../src/Message.h:24:10: 
fatal error: pulsar/c/message.h: No such file or directory
   #39 54.28 .../node_modules/pulsar-client install:    24 | #include 
<pulsar/c/message.h>
   #39 54.28 .../node_modules/pulsar-client install:       |          
^~~~~~~~~~~~~~~~~~~~
   #39 54.28 .../node_modules/pulsar-client install: compilation terminated.
   ```
   
   
   In my case, the issue was caused by a failure of download of the prebuilt 
binary.
   
   The root cause turned out to be npm’s 
`network-family-autoselection-attempt-timeout` setting (default: 250ms).  
   Because the download request timed out too quickly, `node-pre-gyp` failed to 
fetch the prebuilt binary from archive.apache.org and fell back to a local 
build, which then failed.
   
   So, I set a env variable, `NODE_OPTIONS="--no-network-family-autoselection". 
And the issue was resolved.


-- 
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]

Reply via email to