altence / lightence-ant-design-react-template

Free and easy-to-use admin template based on React 17+
https://altence.com/lightence-landing
MIT License
994 stars 251 forks source link

Could not build / start the project #286

Closed weird-oecophylla closed 7 months ago

weird-oecophylla commented 8 months ago

Using yarn install and then yarn start as mentioned in readme does not work.

I obtain the following error:

{
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v21.6.0

To Reproduce Steps to reproduce the behavior:

  1. git clone
  2. yarn install && yarn start

Expected behavior Successfull yarn start

dogmatic69 commented 8 months ago

https://github.com/altence/lightence-ant-design-react-template/blob/main/package.json#L122-L124

add this option to your node environment and it will on v21.


--openssl-legacy-provider 
``
sanjib-suna commented 7 months ago

Getting same issue, @weird-oecophylla have you find any resolution on this?

jin-li commented 7 months ago

I got the same error after upgrading my Node.js to v20.11.0. The error is caused by Node.js v17 fixing a security hole in the SSL provider, see https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported. Most answers in this post suggest to downgrade Node.js to v16. But obviously it's not a good idea.

After several tries, this works for me (I am using Ubuntu 22):

export NODE_OPTIONS==--openssl-legacy-provider
yarn install
yarn start
weird-oecophylla commented 7 months ago

The following configuration worked for bypassing ssl errors.

image

Problem solved !