error on expo build - keeps referencing old or not found app.json item

I have an issue where I’m developing a React Native 4.x version (using 0.59.8) in the build with Expo 34.0.x. I had recently had things working periodically though build changes, but recently I suddenly get the same error after starting expo with npm start. And that is after I scan the QR code (using Android - Galaxy S9) the Expo start screen tries to load about 4 times, prints running app on SM-Gxxx about 4 times and errors. The view log always now shows at the bottom - Uncaught error: can’t find variable StyleSheet (which is there in nearly all the builds I’ve done) and at the top Uncaught Error: Application main has not been registered. It keeps giving reference to a slug I cannot find in any of the app.json files. I was advised to delete all of the node mods and then run expo doctor to which I did, and I still get the error and expo doctor cmd said no issues found.
Can anyone shed light on to this for me please? If you’re encountering similar errors?

1 Like

Not sure if it’s the same thing, but I once had weird errors where something was being cached somewhere. In the end, the only way I was able to get rid of it was to clear the cache/data on the Expo (now Expo Go) app on my phone.

I was thinking I was going to try that and other than signing out, and clearing recent projects, I don’t really see that option in my Expo app. How do I do it or where do I find it? I have client ver 2.15.4, FWIW. Ok, I found it in the app mgr of the phone. Let me try that.

Ok, thank you, wodin, that worked, sir! I then got an error regarding the createStack Navigator and that it needed react-navigation-stack. So I installed that and now get another error.
Unable to resolve “react-native-safe-area-context” from “node_modules\react-navigation-stack\lib\module\vendor\views\Stack\StackView.js”
Failed building JavaScript bundle.


What version of react-navigation are you using?

I am using “^3.13.0”. Wodin’s suggestion helped with that error. I’m getting a different error now, though the initial build and screen (ProdOverviewScrn) loads.
I am getting again an error of Invariant Violation: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined when clicking one of two buttons, which I’m working on trying to resolve.