Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary Download and Fallback to Build Fail on Node 8 #44

Closed
abmusse opened this issue Oct 19, 2018 · 3 comments
Closed

Binary Download and Fallback to Build Fail on Node 8 #44

abmusse opened this issue Oct 19, 2018 · 3 comments
Labels
bug Something isn't working major

Comments

@abmusse
Copy link
Member

abmusse commented Oct 19, 2018

Original report by David Russo (Bitbucket: DavidRusso, GitHub: DavidRusso).


I'm having problems installing idb-connector 1.1.3 with Node 8. If I try to install into a new project with no other dependencies I get this output:

#!
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for idb-connector@1.1.3 and node@8.12.0 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Remote end closed socket abruptly.
node-pre-gyp WARN Pre-built binaries not installable for idb-connector@1.1.3 and node@8.12.0 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error bad download

Looks like 'needle' is unable to download the pre-built binary for some reason. Furthermore, the build fails when it falls back to trying to compile from source code with this:

#!

gyp: /home/drusso/idbtest/node_modules/idb-connector/build/config.gypi not found (cwd: /home/drusso/idbtest/node_modules/idb-connector) while reading includes of binding.gyp while trying to load binding.gyp

An interesting thing I noticed is that if I first install 'request' in my project, the idb-connector installation succeeds. Apparently 'node-pre-gyp' uses 'request' to do the download instead of 'needle";

#!

node-pre-gyp WARN Using request for node-pre-gyp https download
[idb-connector] Success: "/home/drusso/idbtest/node_modules/idb-connector/lib/binding/Release/node-v57-ibmi-ppc64/db2ia.node" is installed via remote

I'm getting this result with Node.js 8.12.0 on IBM i 7.2. The problem does not occur if I use Node.js 10.11.0 on the same system. In that case, 'needle' is able to download the binary and install w/o problems.

Is there some way to correct this problem for Node.js 8 so that it's not necessary to install 'request' first? Maybe request can be included in the idb-connector dependencies?

@abmusse
Copy link
Member Author

abmusse commented Oct 22, 2018

Original comment by Xu Meng (Bitbucket: mengxumx, GitHub: dmabupt).


@DavidRusso Yes, I am investigating this issue. It is weird. On my system, the error occurs if I install idb-connector to the global directory using node 8.12.0 -->

#!

bash-4.4$ npm -g i idb-connector

> idb-connector@1.1.3 install /QOpenSys/pkgs/lib/nodejs8/lib/node_modules/idb-connector
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for idb-connector@1.1.3 and node@8.12.0 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)

But it works fine if I simply use the 'local' install -->

#!
bash-4.4$ npm i idb-connector

> idb-connector@1.1.3 install /home/xumeng/test/getimg/node_modules/idb-connector
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
[idb-connector] Success: "/home/xumeng/test/getimg/node_modules/idb-connector/lib/binding/Release/node-v57-ibmi-ppc64/db2ia.node" is installed via remote

While node 10 and previous node 8 versions have no such a issue.

@abmusse
Copy link
Member Author

abmusse commented Oct 22, 2018

Original comment by Xu Meng (Bitbucket: mengxumx, GitHub: dmabupt).


I am afraid that it is a node-pre-gyp issue. So I updated the node-pre-gyp version to 0.11.0 in idb-connector v1.1.4.
On my dev system, the 'needle' issue has gone. Would you try the new version?

@abmusse
Copy link
Member Author

abmusse commented Oct 22, 2018

Original comment by David Russo (Bitbucket: DavidRusso, GitHub: DavidRusso).


It works now, thanks!

@abmusse abmusse closed this as completed Oct 22, 2018
@abmusse abmusse added major bug Something isn't working labels Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant