xf00f / web3x

Ethereum TypeScript Client Library - for perfect types and tiny builds.
211 stars 27 forks source link

Document supported JS engines #38

Closed webmaster128 closed 5 years ago

webmaster128 commented 5 years ago

Heho again! Thanks for building web3x!

When installing web3x on a Node.js 8 LTS system, I get the error

yarn install v1.13.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
error bigint-buffer@1.1.2: The engine "node" is incompatible with this module. Expected version ">= 10.0.0". Got "8.15.1"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Retry 1/3 exited 1, retrying in 1 seconds...
yarn install v1.13.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
error bigint-buffer@1.1.2: The engine "node" is incompatible with this module. Expected version ">= 10.0.0". Got "8.15.1"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Retry 2/3 exited 1, retrying in 2 seconds...
yarn install v1.13.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
error bigint-buffer@1.1.2: The engine "node" is incompatible with this module. Expected version ">= 10.0.0". Got "8.15.1"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

because the dependency bigint-buffer requires Node.js 10+.

Looking at the web3x code it seams that native bigint is also required. This limits the JS environments in which this library can be used to a few cutting edge engines. Would it be possible to use bn.js instead to make this work with Node.js 8 as well? In any case, I think the supported JS environments should be documented.

xf00f commented 5 years ago

@webmaster128 I've posted consideration of this issue in https://github.com/xf00f/web3x/issues/36

xf00f commented 5 years ago

web3x-evm is now it's own package, meaning web3x should run standalone on Node 8.