Olá, tudo bem? Gostaria de pedir ajuda para rodar o projeto react-native-navegacao-entre-telas da aula navegando para o produtor. Estarei listando abaixo as minhas configurações e os erros que estou recebendo. Procurei na internet uma solução para o problema, porém não obetive sucesso.
Node: 14.17.2 Npm: 6.14.13 React Native: 6.2.0
Quando rodo o comando npm start
não ocorre nenhum erro. Porém quando executo npx react-native run-android
é retornado o erro abaixo:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 911 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
:ReactNative:Running '[node, -e, console.log(require('react-native/cli').bin);]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script 'G:\projetos\react-native-navegacao-entre-telas\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 197
* What went wrong:
A problem occurred evaluating script.
> Cannot run program "node" (in directory "G:\projetos\react-native-navegacao-entre-telas\android"): CreateProcess error=740, A opera��o solicitada requer eleva��o
* 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 911ms
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:Running '[node, -e, console.log(require('react-native/cli').bin);]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script 'G:\projetos\react-native-navegacao-entre-telas\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 197
* What went wrong:
A problem occurred evaluating script.
> Cannot run program "node" (in directory "G:\projetos\react-native-navegacao-entre-telas\android"): CreateProcess error=740, A opera��o solicitada requer eleva��o
* 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 911ms
at makeError (G:\projetos\react-native-navegacao-entre-telas\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at G:\projetos\react-native-navegacao-entre-telas\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (G:\projetos\react-native-navegacao-entre-telas\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (G:\projetos\react-native-navegacao-entre-telas\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
Quando crio um projeto normalmente ambos os comando funcionam sem nenhum problema. Desde já, gostaria de agradecer pela ajuda.