Boa noite, estou tendo o seguinte erro ao tentar executar uma aplicação nativa pelo react native nativo.
segue o código:
\projetos\RN\orgs>npx react native run-androidnpm ERR! could not determine executable to run
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\guivi\AppData\Local\npm-cache_logs\2022-06-28T02_25_51_639Z-debug-0.log
\projetos\RN\orgs>npx react-native run-android info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 945 file(s) to forward-jetify. Using 16 workers... info Starting JS server... info Installing the app... :ReactNative:Unexpected empty result of running '[node, \projetos\RN\orgs\node_modules@react-native-community\cli\build\bin.js, config]' command. :ReactNative:Running '[node, \projetos\RN\orgs\node_modules@react-native-community\cli\build\bin.js, config]' command failed.
FAILURE: Build failed with an exception.
Where: Script '\projetos\RN\orgs\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 213
What went wrong: A problem occurred evaluating script.
node:internal/modules/cjs/loader:949 throw err; ^Error: Cannot find module '\projetos\RN\orgs\node_modules@react-native-community\cli\build\bin.js' at Module.resolveFilename (node:internal/modules/cjs/loader:946:15) at Module.load (node:internal/modules/cjs/loader:787:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []}Node.js v18.4.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
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 :ReactNative:Unexpected empty result of running '[node,\projetos\RN\orgs\node_modules@react-native-community\cli\build\bin.js, config]' command. :ReactNative:Running '[node, \projetos\RN\orgs\node_modules@react-native-community\cli\build\bin.js, config]' command failed.
FAILURE: Build failed with an exception.
Where: Script '\projetos\RN\orgs\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 213
What went wrong: A problem occurred evaluating script.
node:internal/modules/cjs/loader:949 throw err; ^Error: Cannot find module 'projetos\RN\orgs\node_modules@react-native-community\cli\build\bin.js' at Module.resolveFilename (node:internal/modules/cjs/loader:946:15) at Module.load (node:internal/modules/cjs/loader:787:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []}Node.js v18.4.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
at makeError (projetos\RN\orgs\node_modules\execa\index.js:174:9)
at\projetos\RN\orgs\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (\projetos\RN\orgs\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (\projetos\RN\orgs\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.