bitcore-node icon indicating copy to clipboard operation
bitcore-node copied to clipboard

Bitcoin download script stops installation on unsupported platform

Open ivoaz opened this issue 9 years ago • 5 comments

When trying to run npm install on a platform that is not supported by Bitcoin download script, it stops the installation. Since the platform check is in the beginning of the script, SKIP_BITCOIN_DOWNLOAD variable does not help.

Here's the output when trying to run npm install on a FreeBSD with a manually compiled Bitcoin:

> [email protected] preinstall /usr/home/bitcoin/node/bitcore-node
> ./scripts/download

Bitcoin binary distribution not available for platform and architecture

npm ERR! FreeBSD 10.3-RELEASE
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.6.0
npm ERR! npm  v2.15.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] preinstall: `./scripts/download`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script './scripts/download'.
npm ERR! This is most likely a problem with the bitcore-node package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./scripts/download
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bitcore-node
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls bitcore-node
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/home/bitcoin/node/bitcore-node/npm-debug.log

I think the platform check should be inside the download function or just exit with a non-error code when not supported.

I can work on a fix if this is indeed a bug.

ivoaz avatar Oct 21 '16 10:10 ivoaz

Braydonf posted a fix for this week's ago but never merged it. On Linux i686 platforms, the installation exists with me error. This is the link to the pull request. https://github.com/bitpay/bitcore-node/pull/486

kreshendo avatar Oct 21 '16 12:10 kreshendo

I wish you could edit a comment.

"On Linux i686 platforms, the installation exists with *no error"

kreshendo avatar Oct 21 '16 13:10 kreshendo

@kreshendo this is not the issue I am referring to. That PR fixes that there is no error message for unsupported architecture. My issue is that I can not skip the download and install everything else.

ivoaz avatar Oct 21 '16 13:10 ivoaz

@ivoaz did you get to install on FreeBSD?

I'm still trying.

xipher0 avatar Jul 09 '17 11:07 xipher0

@xipher0 I removed 22nd line in scripts/download file and set SKIP_BITCOIN_DOWNLOAD env variable before running npm install:

sed -i.bak -e '22d' scripts/download
export SKIP_BITCOIN_DOWNLOAD=1

ivoaz avatar Jul 13 '17 13:07 ivoaz