jurteam / platform

Jur Beta Platform
https://beta.jur.io
0 stars 0 forks source link

We are bound to node 11.x because of node-scrypt #147

Open ashishjur opened 4 years ago

ashishjur commented 4 years ago

npm install will fail on the fresh installation if node version is 12+. We have to use node 11.x in order for node-scrypt to compile.

Ref: https://github.com/barrysteyn/node-scrypt/issues/192 It looks like this package is not maintained and web3 version which we are using 1.0.0-beta.37 depends on it.

Expected Behavior

npm install should work in with newer versions of node such as 14.

Current Behavior

npm install fails due to dependency on the unmaintained package node-scrypt (via web3 @ 1.0.0-beta.37) with newer versions of node (confirmed on v 12.x and 14.x). We are forced to use node v 11.x.

Node v 11.x is EOL since 1 Jun 2019 Ref: https://nodejs.org/en/about/releases/

Possible Solution

  1. Upgrade version of web3. Hopefully, authors have moved away from unmaintained dependencies. [UPDATE]: Even latest version of web3 uses scrypt
  2. Remove web3 from the stack and switch to Connex completely

Steps to Reproduce

Environment: Any

  1. git clone this repo (platform) OR delete node_modules
  2. Install newer versions of node (latest, lts or 14.3). You can use n for managing multiple node versions.
  3. run npm install as fresh (without cache)
ashishjur commented 4 years ago

I'm checking more on the root cause of this issue. Might be miss reporting. [UPDATE]: It's confirmed.

marcomarasco commented 4 years ago

@ashishjur according also with @lucaydaniel we don't use web3 anymore on JBP frontend since we moved to Connex. Is one of the main reason we moved to Connex.

Meanwhile, web3-v.1.0.0-beta.37 in conjunction with truffle-v4.x is still used by JUR Token and ArbitrationFactory testing and deployment.

Also some clean up of the web3 related code from JBP is needed

ashishjur commented 4 years ago

It's good that we are moving away from web3. Event the latest version of web3 still depends upon scrypt. Scrypt is un-maintained for the last 4 years. As long as we have web3 in our stack, we are locked with scrypt and hence to NodeJS version 11.x

Node 11.x is out of support from the official node community.

Node Release Lifecycle Current State: https://nodejs.org/en/about/releases/ Scrypt Ref: https://www.npmjs.com/package/scrypt