Skip to content

Bitcoin download script stops installation on unsupported platform #488

@ivoaz

Description

@ivoaz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions