EDIT: I am uncertain which steps I took to resolve this problem, and am no longer seeing this error message so I cannot test the solutions below. Please try them individually as different answers seem to be working for different people.
The iOS version works fine, but running Android Studio on my Mac I get the following Gradle Build error (paraphrased):
:ReactNative:Running ‘[node, -e, console.log(require(‘react-native/cli’).bin);]’ command failed. - Where: Script ‘/Users/…/Desktop/…/node_modules/@react-native-community/cli-platform-android/native_modules.gradle’ line: 154 - What went wrong: A problem occurred evaluating script. > Cannot run program “node”: error=2, No such file or directory Caused by: java.io.IOException: Cannot run program “node”: error=2, No such file or directory
I've tried so many things:
I used to be able to still run yarn android in Terminal, but even that has stopped working.
It's because android studio couldn't find node and should run through terminal.
If you are using Mac you can run Android studio using This command in terminal
1. Run this open -a /Applications/Android\ Studio.app
2. Then sync Gradle
And this will solve the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With