invoice-generator icon indicating copy to clipboard operation
invoice-generator copied to clipboard

[ERROR] Digital envelope routines::unsupported

Open Pranjal7852 opened this issue 8 months ago • 2 comments

While setting up the app locally I came across this error.

Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at module.exports (/Users/pranjalgoyal/Documents/web/swipe-frontend/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/Users/pranjalgoyal/Documents/web/swipe-frontend/node_modules/webpack/lib/NormalModule.js:417:16) at /Users/pranjalgoyal/Documents/web/swipe-frontend/node_modules/webpack/lib/NormalModule.js:452:10 at /Users/pranjalgoyal/Documents/web/swipe-frontend/node_modules/webpack/lib/NormalModule.js:323:13 at /Users/pranjalgoyal/Documents/web/swipe-frontend/node_modules/loader-runner/lib/LoaderRunner.js:367:11 at /Users/pranjalgoyal/Documents/web/swipe-frontend/node_modules/loader-runner/lib/LoaderRunner.js:233:18 at context.callback (/Users/pranjalgoyal/Documents/web/swipe-frontend/node_modules/loader-runner/lib/LoaderRunner.js:111:13) at /Users/pranjalgoyal/Documents/web/swipe-frontend/node_modules/babel-loader/lib/index.js:59:103 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }

Node.js v18.16.0

Pranjal7852 avatar Nov 08 '23 13:11 Pranjal7852

After further drilling this seems to be an error that can be debugged using export SET NODE_OPTIONS=--openssl-legacy-provider in the start and build scripts of the app inside package.json

Pranjal7852 avatar Nov 08 '23 13:11 Pranjal7852

For unix based systems

"start": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start", "build": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build",

In Windows, omit the export keyword

"start": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start", "build": "SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build",

kd1729 avatar Nov 17 '23 18:11 kd1729