flambi
flambi

Reputation: 11

Cannot find module node_modules\@react-native-community\cli\build\bin.js'

After using expo eject i tried to run my app on android emulator:

PS C:\Users\becim\OneDrive\Počítač\test> yarn android
yarn run v1.22.5
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1296 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
:ReactNative:Unexpected empty result of running '[node, C:\Users\becim\OneDrive\Počítač\test\node_modules\@react-native-community\cli\build\bin.js, config]' command.
:ReactNative:Running '[node, C:\Users\becim\OneDrive\Počítač\test\node_modules\@react-native-community\cli\build\bin.js, config]' command failed.

FAILURE: Build failed with an exception.

node:internal/modules/cjs/loader:928 throw err; ^Error: Cannot find module 'C:\Users\becim\OneDrive\PoÄŤĂ­taÄŤ\test\node_modules@react-native-community\cli\build\bin.js' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15) at Function.Module._load (node:internal/modules/cjs/loader:769:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []}

BUILD FAILED in 8s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 :ReactNative:Unexpected empty result of running '[node, C:\Users\becim\OneDrive\Počítač\test\node_modules@react-native-community\cli\build\bin.js, config]' command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any solution to this?

Upvotes: 1

Views: 5942

Answers (2)

AuroPick
AuroPick

Reputation: 103

It is happening because of your path. Move your project to english-based path

Upvotes: 2

Gaby
Gaby

Reputation: 17

Delete your node modules directory and run this command :

npm install

Upvotes: 1

Related Questions