So this type of the error. How to solve this
Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:135:10) at stableHash (/home/shavkat/Android/AwesomeProject/node_modules/metro-cache/src/stableHash.js:19:8) at Object.getCacheKey (/home/shavkat/Android/AwesomeProject/node_modules/metro-transform-worker/src/index.js:593:7) at getTransformCacheKey (/home/shavkat/Android/AwesomeProject/node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:24:19) at new Transformer (/home/shavkat/Android/AwesomeProject/node_modules/metro/src/DeltaBundler/Transformer.js:48:9) at /home/shavkat/Android/AwesomeProject/node_modules/metro/src/Bundler.js:22:29 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }
CodePudding user response:
The problem is with your node version. try this solution on github and it should work for you.
CodePudding user response:
Here is two option now -
Try to uninstall Node.js version 17 and reinstall the Node.js version 16
Open terminal and paste these as described :
Linux & Mac OS (windows git bash)-
export NODE_OPTIONS=--openssl-legacy-provider
Windows command prompt-
set NODE_OPTIONS=--openssl-legacy-provider
Reference Link