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

For local development, starting the interface fails with an error if using recent versions of Node #84

Open
mattrjohnson opened this issue Jun 18, 2022 · 2 comments

Comments

@mattrjohnson
Copy link

I got through the "local development" instructions as far as running the Node-based interface (npm start within the interface directory), but then got the error "error:0308010C:digital envelope routines::unsupported".

Per the top answer on this Stack Overflow post (https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported), it appears that if you use Node 17 or later, there has been some kind of change to OpenSSL behavior that causes this issue. One of the workarounds they suggested (export NODE_OPTIONS=--openssl-legacy-provider at the command line) worked for me, but of course it's not ideal. At the minimum, I guess this workaround would be good to mention in the instructions, but best-case scenario it would be nice if the error could just be fixed.

I'm not really a Node developer so this is as far up the stack as I have traced the issue so far... not sure if it is something that is easily fixed in this repo or if it is a problem upstream in some dependency. Others may have a more immediate idea of the best way to fix? But let me know if there are any questions and I can investigate further!

@u1f98e
Copy link

u1f98e commented Jun 19, 2022

Using Node 16.14, and having the same issue. Using --openssl-legacy-provider in either NODE_OPTIONS or in the start command results in it refusing to start at all, apparently it was removed at some point for security. I assume whatever change that was done in Node 17 got backported to 16, not really plugged into the Node ecosystem.

The root of the problem is that the version of react-scripts specified is old, and ships an old version of webpack which had this issue. I changed the react-scripts version to the most recent one (5.0.1) in package.json and ran npm install again. The interface now starts, though I haven't tested anything past the landing page as I'm having a separate issue with the backend.

I would make a pull request, but I don't know if there's any further compatibility issues with a more recent version of react-scripts.

@saharmor
Copy link
Owner

I've upgraded react-scripts to 5.0.1 - can you please check if the error still persists? @mattrjohnson

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

No branches or pull requests

3 participants