keep-network / local-setup

Allow to easily set up tBTC and Keep locally for development and test purposes.
MIT License
8 stars 16 forks source link

Use single Node.js version #14

Open lukasz-zimnoch opened 4 years ago

lukasz-zimnoch commented 4 years ago

Currently install.sh script requires node 11.15.0 to be executed successfully. Using a newer version cause fails during npm install in keep-core and keep-ecdsa repositories. On the contrary, e2e tests use some features (like json-modules) which are available in node > 13 hence we have to switch node versions which is cumbersome. The need of switch also causes some non-blocking errors related to node-gyp while executing e2e tests. We should find a way to run everything using a single node version and fix the problem with node-gyp.

Shadowfiend commented 4 years ago

Using a newer version cause fails during npm install in keep-core and keep-ecdsa repositories.

Can you give me a pointer on this? I've been doing npm install for keep-core and keep-ecdsa both with Node 12.16.3 for a while with no issues. The node-gyp builds fail, but do not result in an install failure (all of the relevant packages in our dependencies fall back on JS implementations of the native-built functions).

e2e tests use some features (like json-modules) which are available in node > 13

A small nit here: Node 12 (the LTS version) supports JSON modules as well as the --experimental-json-modules flag.

I can't speak to other Node versions, but I suggest it may be worth trying specifically anchoring to Node 12 for the full build. Since it's the LTS version, I think that's also a sound decision overall.