编辑: 我不确定我采取了哪些步骤来解决这个问题,并且不再看到这个错误消息,所以我不能测试下面的解决方案。请单独尝试,因为不同的答案似乎对不同的人有效。
IOS 版本运行良好,但是在我的 Mac 上运行 Android Studio 我会得到下面的 Gradle Build 错误(转述) :
: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
我试过很多方法:
我曾经能够在终端运行纱线机器人,但即使这已经停止工作。