Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore:fix: restrict node engine versions #3

Merged

Conversation

sripwoud
Copy link
Member

@sripwoud sripwoud commented Sep 22, 2022

I ran into the following error when running yarn demo with node versions higher than 17.0.0:

Error HH604: Error running JSON-RPC server: error:0308010C:digital envelope routines::unsupported

It looks like it is due to Node 17.0.0 starting to use OpenSSL3
webpack/webpack#14532 (comment)

It can be solved for instance by:

  • restricting the node engine versions in top level package.json
  • or using the --openssl-legacy-provider NODE_OPTIONS flag as suggested here

I suggest the first solution because

  • I think unless one is familiar with the flag --openssl-legacy-provider, it will raise questions when one sees it used in a script
  • we would need to add this flag to all the scripts that need it
  • using engines in package.json is probably a more common way to avoid such compatibility issues.

Test plan

  • on main branch:
    • yarn demo using NodeJS version >= 17.0.0: you'll see the error message mentioned above
    • yarn demo using NodeJS >= 16.0.0 < 17.0.0: script will execute without issues
  • on this branch:
    You'll be warned that you must use a node version between 16.0.0 and 17.0.0 to run the script
    The engine "node" is incompatible with this module. Expected version ">=16 <17". Got "18.9.0"
    

(I didn't test with versions lower than 16.0.0)

@sripwoud sripwoud changed the title chore: restrict node engine versions chore:fix: restrict node engine versions Sep 22, 2022
@wanseob wanseob merged commit 2a3de49 into privacy-scaling-explorations:main Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants