skip to Main Content

Good day, the issue I’m facing is that I have a package problem. My project is not reading the ‘node_modules’ folder. I’ve already tried restoring it, migrating the project to a new one, and manually transferring files. I’ve also downloaded the required dependencies, but Metro is still not compiling the app.

Loading dependency graph...Failed to construct transformer:  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:138:10)
    at stableHash (C:UsersCOM-PALOMOOneDriveDocumentoslogisticalogisticatrackingnode_modulesmetro-cachesrcstableHash.js:19:8)
    at JsTransformer.getCacheKey (C:UsersCOM-PALOMOOneDriveDocumentoslogisticalogisticatrackingnode_modulesmetrosrcJSTransformerworker.js:471:7)
    at getTransformCacheKey (C:UsersCOM-PALOMOOneDriveDocumentoslogisticalogisticatrackingnode_modulesmetrosrcDeltaBundlerTransformergetTransformCacheKey.js:39:29)
    at new Transformer (C:UsersCOM-PALOMOOneDriveDocumentoslogisticalogisticatrackingnode_modulesmetrosrcDeltaBundlerTransformer.js:147:28)
    at C:UsersCOM-PALOMOOneDriveDocumentoslogisticalogisticatrackingnode_modulesmetrosrcBundler.js:54:29 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

From what I saw, the Node.js version doesn’t support a certain SSL feature, and in the ‘package.json’ file, under ‘scripts’, I added the following line to make Metro run: 'start': 'set NODE_OPTIONS=--openssl-legacy-provider && react-native start'. Metro started successfully, but it doesn’t trigger the options to build the app. It’s worth noting that the React Native project is in version 0.61.4, and the Node.js version installed on my machine is 20.6.0.

2

Answers


  1. yep I think You have a problema :/

    Login or Signup to reply.
  2. I am suggesting to delete node modules folder and re-install node modules by Npm or Yarn,

    and try again to build after gradlew cleaning .(cd android && ./gradlew clean)

    if the problem exist, open the android folder in android studio and sync gradle ,it helps to get more accurate log.

    also try the ios section with workspace in Xcode.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search