ios模拟器未在expo-react原生项目中启动



我知道有很多关于这个问题的帖子,我已经看过所有的解决方案。我安装了Xcode更新。我将expo更新为最新版本。我完全重置了模拟器。我不确定还有什么要做…

(node:89825) UnhandledPromiseRejectionWarning: Error: xcrun exited with non-zero code: 4 at ChildProcess.completionListener (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13) at Object.onceWrapper (events.js:422:26) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1048:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) ... at spawnAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19) at xcrunAsync (/@expo/xdl@59.0.5/src/SimControl.ts:335:18) at Object.bootAsync (/@expo/xdl@59.0.5/src/SimControl.ts:137:11) at action (/@expo/xdl@59.0.5/src/Simulator.ts:310:25) at waitForActionAsync (/@expo/xdl@59.0.5/src/Simulator.ts:292:22) at ensureSimulatorOpenAsync (/@expo/xdl@59.0.5/src/Simulator.ts:207:24) at Object.openProjectAsync (/@expo/xdl@59.0.5/src/Simulator.ts:653:14) at ReadStream.handleKeypress (/usr/local/lib/node_modules/expo-cli/src/commands/start/TerminalUI.ts:224:11) (node:89825) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag—未处理的拒绝=严格的(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 13)

{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/native": "^5.8.10",
"expo": "~39.0.2",
"expo-status-bar": "~1.0.2",
"lottie-ios": "^3.1.8",
"lottie-react-native": "^3.5.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz",
"react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
"react-native-web": "~0.13.12",
"react-navigation": "^4.4.3",
"react-navigation-stack": "^2.10.2"
},
"devDependencies": {
"@babel/core": "~7.9.0"
},
"private": true
}

找到解决方案!

我不得不将.expo的所有权更改为我。我用以下命令解决了这个问题

sudo chown-R MYUSERNAME/Users/MYUSERNAME/.expo/

最新更新