Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: Cannot run program "node"

I have project in React Native, and I'm not being able to build on the Android Studio due the following error.

Here's the detailed log with additional info:

java.io.IOException: Cannot run program "node" (in directory "/Users/fabioernanni/git/fintech-ewallet-mobile/android"): error=2, No such file or directory

java.io.IOException: error=2, No such file or directory

Cause: error=2, No such file or directory

I have tried to reinstall Node, Android Studio, to link the tscript library so the Android Studio would recognize the "node" but nothing seems to help.

like image 538
Ernanni Avatar asked Dec 22 '25 04:12

Ernanni


1 Answers

I have a similar problem with Android Studio (bumble bee) version with node on My Mac M1 Chip 
so to solve this open your Android Studio from terminal
. To Open Android Studio from terminal on Mac m1 just open your Terminal and paste the following command

open -a /Applications/Android\ Studio.app

this will open your android studio and then you can open your project and can run build from android studio Note : be sure that Android studio is not running state if its running just Quite it and then launch from Terminal

like image 161
Ouneeb Ur Rehman Avatar answered Dec 23 '25 23:12

Ouneeb Ur Rehman