farooq alam96
farooq alam96

Reputation: 57

App Build Failed with an Exception in react native, A problem occur in evaluating script

i m new in react native.. when i was run my app following error occurred in command line. Kindly guide me with an appropriate solution... Thanks.

FAILURE: Build failed with an exception.

BUILD FAILED in 36s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 :ReactNative:Unexpected empty result of running 'node -e console.log(require('@react-native-community/cli').bin);' command. :ReactNative:Running 'node -e console.log(require('@react-native-community/cli').bin);' command failed.

Upvotes: 1

Views: 6573

Answers (3)

Raghav Gautam
Raghav Gautam

Reputation: 43

This happened to me with react-native 0.61.5 and cli version 1.0.9.

Updating @react-native-community/cli worked for me.

$ npm install @react-native-community/[email protected]

Upvotes: 1

Anas M.I
Anas M.I

Reputation: 582

There was a bad release of v1.9.6, which was fixed in 1.9.7. Try updating it

OR i would suggest you to install yarn and then run

yarn install

Upvotes: 2

wvicioso
wvicioso

Reputation: 538

Read over the react-native getting started docs again. It seem like you missed a step. The error is saying you are missing @react-native-community/cli module which should have been added during your initial react-native environment set up.

Upvotes: 1

Related Questions