1
votes

So there is my issue.

I've just created a React native project On my M1 macbook air, a blanck project.

yarn start work fine, but when i want to open with an IOS simulator i havr this error : "error opening simulator check metro logs for details"

Also, when i try to open directly to ios simulator in VS code (tape i after yarn start) i have that :

Opening on iOS... Opening the iOS simulator, this might take a moment. (node:2690) UnhandledPromiseRejectionWarning: Error: open exited with non-zero code: 1 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 Socket. (internal/child_process.js:439:11) at Socket.emit (events.js:315:20) at Pipe. (net.js:673:12) ... at spawnAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19) at Object.openSimulatorAppAsync (/@expo/[email protected]/src/SimControl.ts:308:16) at ensureSimulatorOpenAsync (/@expo/[email protected]/src/Simulator.ts:185:22) at Object.openProjectAsync (/@expo/[email protected]/src/Simulator.ts:674:14) at ReadStream.handleKeypress (/usr/local/lib/node_modules/expo-cli/src/commands/start/TerminalUI.ts:228:11) (Use node --trace-warnings ... to show where the warning was created) (node:2690) 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 --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4) (node:2690) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

So if anyone have a clue, i've tried to change .expo username with : "sudo chown -R MYUSERNAME /Users/MYUSERNAME/.expo/" (apparently it solve this issue for someone else but not me..

Thanks in advance, i'm just starting with react native, and start with this kind of error it's quite frustrating.

1
Update : Problem solved by running : expo client:install:iosSouhail Mohamed

1 Answers

2
votes

Update : Problem solved by running : expo client:install:ios