System:
OS: macOS 11.3
CPU: (8) arm64 Apple M1
Memory: 124.86 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.0.0 - /opt/homebrew/bin/node
Yarn: Not Found
npm: 7.10.0 - /opt/homebrew/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.10.1 - /Users/chia/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
新的RN项目创建成功,但由于Xcode构建失败。
错误信息:
错误:找不到Node。请确保它在bash路径中或设置NODE_BINARY环境变量。
命令PhaseScriptExecution失败,具有非零退出代码
Node是由Homebrew安装的,在英特尔mbp上没有这个错误。
如何解决此错误?
确认Node是否在PATH中:
npm -g bin
/opt/homebrew/bin
echo $PATH
/Users/chia/.pyenv/shims:/Users/chia/.rbenv/shims:/Users/chia/.rbenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
java
或gradle
守护进程的问题?我试一下。 - Joshua Pinter