在过去的几个小时里,React Native 0.68.2在iOS构建尝试中出现了一个问题,这使我无法构建我的项目,迫使我每次都从git存储库中重新复制来恢复。
经过一些编辑和构建,运行npm run ios
导致它卡在Planning Build..
。当我尝试手动打开XCode项目文件时,它立即进入无响应状态。
运行命令时终端输出的全部内容:
(base) myMachine project-master % npm run ios
> project@1.0.0 ios
> expo run:ios
✔ Installed pods and initialized Xcode workspace.
› Planning build (hangs here)
我已经尝试了关于这个问题的上一个问题中列出的步骤,但是它们都没有工作,我不断需要再次获取项目。有没有办法一劳永逸地解决这个问题?都快把我逼疯了
react-native info
:
System:
OS: macOS 12.4
CPU: (10) arm64 Apple M1 Pro
Memory: 279.42 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.1 - /opt/homebrew/opt/node@16/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.11.0 - /opt/homebrew/opt/node@16/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 17.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
package.json
{
"name": "project",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.17.6",
"@react-native-community/netinfo": "^9.0.0",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2",
"@react-navigation/stack": "^6.2.1",
"expo": "~45.0.0",
"expo-splash-screen": "~0.15.1",
"expo-status-bar": "~1.3.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-azure-auth": "^1.8.3",
"react-native-gesture-handler": "^2.4.2",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "^3.13.1",
"react-native-web": "0.17.7"
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
"private": true
}
我卸载了react native客户端,然后使用npx react-native run-ios
npm uninstall -g react-native-cli
npx react-native run-ios
这似乎是一个奇怪的问题,如何XCode与iCloud文件夹(桌面,文档等)的行为。似乎现在固定通过移动我的开发目录到我的主文件夹(~/Dev/Project
)。