Have to restart server to see changes for iOS locally

I’ve been fighting this issue for well over 2 weeks now.

Basically, I have a Expo app created with the npx create-expo-app --template blank-typescript command. When I run it using npm run ios, or npx expo start --ios, all works fine.

It’s when I update some of my files where can’t seem to see any of the changes in the iOS simulator. Not even if I trigger the developer menu and hit reload do I see my changes. I have to close the simulator, quit my server, and restart to make it show.

I’ve tried running npm run web and that works perfectly fine. I’ve been diving deep into trying to see if it’s a issue with Watchman, but I feel like I’ve tried every single suggested solution out there.

Does anyone have the slightest hunch of what could be going here?

Help would be highly appreciated, and I will of course provide more details when necessary. I’m so eager to build this app right now, so this really bums me out to be honest :confused:

Do you see any output on the terminal after you save an update to a file, e.g., a message like iOS bundling complete? I’m not sure what it would be, but, if you don’t, that would indicate some kind of watchman issue. If watchman doesn’t pick up the change, the code isn’t rebuilt, and refresh isn’t triggered (nor would manually refreshing change anything).

One good thing to try just in case you haven’t already in the dev menu would be to make sure the debugger is turned off, just to eliminate entities to troubleshoot.

Yeah I’m not getting anything in the terminal on save. Don’t have debugging enabled either. If I run watchman watch-list, it does show the app through…

{
    "version": "HEAD-039ebd4",
    "roots": [
        "/Users/demando/Desktop/test-app-2"
    ]
}

Hmm, I think it might have been something with how I ordered my environment variables in my .zshrc. Also had some duplicates. I cleaned those out and moved the NVM variables to the bottom of the file, and now it seems to work. I also interestingly noticed that I get the actual QR code in the terminal, which I didn’t get previously…

1 Like