"Simulator not installed" after running sdk33 codemode

I upgraded my project to Expo SDK 33. I ran my project successfully, and noticed my assets weren’t loading. I needed to update my Asset imports to use the standalone expo-asset module. The blog post for SDK 33 mentioned this codemod to update all of my imports automatically. I ran the codemod using npx expo-codemod sdk33-imports . at the root of my project, and thereafter have been getting the following error:

Simulator not installed. Please visit https://developer.apple.com/xcode/download/ to download Xcode and the iOS simulator. If you already have the latest version of Xcode installed, you may have to run the command sudo xcode-select -s /Applications/Xcode.app.

Running the suggested command does not work. I tried uninstalling expo-cli and node_modules to no avail. Google doesn’t seem to have much in the way of this error. Help very much appreciated.

Thanks!

Hi @orr! You get this error after running expo start after having already successfully run the codemod? Are you able to run it on the Android emulator?

I’m not sure I can say it ran successfully given that it seemed to have broken my app. The line that is failing is line 34 of node_modules/expo-cli/node_modules/@expo/xdl/build/Simulator.js:

result = (yield (_osascript || _load_osascript()).default.execAsync('id of app "Simulator"')).trim();

It’s failing with error:

Cannot read property ‘execAsync’ of undefined

However, if I run the osascript command manually in my terminal:

$osascript -e ‘id of app “Simulator”’
$com.apple.iphonesimulator

I’ve never tried running my app in an Android simulator before, so I can set that up if it will help, but hopefully this info could help. Please let me know if you have an idea what’s going on.

Thanks for your time

Did the fix in that Github issue work for you?

Yeah, installing Expo into the local folder and running that re-write script prior to starting expo fixes the issue.

I believe this was fixed in the most recent update of expo-cli, can you try updating to v2.19.1 and let me know if you still get this behavior?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.