Discussions

Ask a Question
Back to All

I can't run my project

https://github.com/ViroCommunity/starter-kit#:~:text=git%20clone%20https%3A//github.com/ViroCommunity/starter%2Dkit.git

I started by following this guide step by step, but every time I try to run my project on my Android device, it generates an error and I don't know how to resolve it, can you help me? The error is:

Failed to construct transformer:  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at stableHash (C:\Users\coses\Desktop\samu\ReactNative\prova\node_modules\metro-cache\src\stableHash.js:19:8)
    at Object.getCacheKey (C:\Users\coses\Desktop\samu\ReactNative\prova\node_modules\metro-transform-worker\src\index.js:593:7)
    at getTransformCacheKey (C:\Users\coses\Desktop\samu\ReactNative\prova\node_modules\metro\src\DeltaBundler\getTransformCacheKey.js:24:19)
    at new Transformer (C:\Users\coses\Desktop\samu\ReactNative\prova\node_modules\metro\src\DeltaBundler\Transformer.js:48:9)
    at C:\Users\coses\Desktop\samu\ReactNative\prova\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'
}

and this:

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

    at makeError (C:\Users\coses\Desktop\samu\ReactNative\prova\node_modules\execa\index.js:174:9)
    at C:\Users\coses\Desktop\samu\ReactNative\prova\node_modules\execa\index.js:278:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runOnAllDevices (C:\Users\coses\Desktop\samu\ReactNative\prova\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (C:\Users\coses\Desktop\samu\ReactNative\prova\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.