Cli: Problemas com @react-native-community\cli\build\bin.js ao rodar npx react-native run-android

Created on 18 Aug 2020  ·  2Comments  ·  Source: react-native-community/cli

Estou tentando fazer o React Native rodar aqui, segui os passos conforme a documentação mas continua dando esse erro, já tentei de tudo mas nada. Instalei tudo certinho, rodei o npx react-native start e depois rodei o npx react-native run-android, foi quando deu erro erro.

Tenho o Android Studio baixado e configurado, o emulador está rodando certinho.

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\Users\Sarah\Desktop\Arquivos Aulas\Programa��o\React Native\Curso RocketSeat\hunt\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 195

  • What went wrong:
    A problem occurred evaluating script.

    internal/modules/cjs/loader.js:1083 throw err; ^Error: Cannot find module 'C:\Users\Sarah\Desktop\Arquivos Aulas\Programação\React Native\Curso RocketSeat\hunt\node_modules\@react-native-community\cli\build\bin.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1080:15) at Function.Module._load (internal/modules/cjs/loader.js:923:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []}

BUILD FAILED in 6s

error Failed to install the app.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
:ReactNative:Unexpected empty result of running '[node, C:\Users\Sarah\Desktop\Arquivos Aulas\Programação\React Native\Curso RocketSeat\hunt\node_modules\@react-native-community\cli\build\bin.js, config]' command.

question

Most helpful comment

Hi @goncalves-sarah ! How are you doing? I've ran into the same issue, and figured out that the problem was the use of the "tilde" (or also may happen with the "ñ"). If you see your path, you will check that it's for the same reason:

'C:\Users\Sarah\Desktop\Arquivos Aulas\Programa��o\React Native\Curso RocketSeat\hunt\node_modules@react-native-community\cli-platform-android\native_modules.gradle'

Check the Programa��o folder.

Please, avoid the use of "tilde" or "ñ" when dealing with development tools that are english-based.

After fixing the folder name, I was able to run it correctly.

All 2 comments

Please provide an English version of your problem (you can use deepl or google translate). Also, please follow the issue template, providing versions used and such. For now I have to close this, because it's not actionable from our side. Happy to reopen once more information is available.

Hi @goncalves-sarah ! How are you doing? I've ran into the same issue, and figured out that the problem was the use of the "tilde" (or also may happen with the "ñ"). If you see your path, you will check that it's for the same reason:

'C:\Users\Sarah\Desktop\Arquivos Aulas\Programa��o\React Native\Curso RocketSeat\hunt\node_modules@react-native-community\cli-platform-android\native_modules.gradle'

Check the Programa��o folder.

Please, avoid the use of "tilde" or "ñ" when dealing with development tools that are english-based.

After fixing the folder name, I was able to run it correctly.

Was this page helpful?
0 / 5 - 0 ratings