I am having trouble with building my App. Running it via Expo in the simulators (iOS and Android) works fine, but after building it it triggers a blue screen with the Error mentioned in the title.
Further investigation leads to discovering one more error:
Unfortunately I have no clue how to trace that error back and how or why this is happening.
I am not running any other packager at the same time and I did not modify the original entry point (it is still App.js)
Also I was not able to provoke the error with
exp start --no-dev --minify, it continues to run as expected in Expo.
I would really appreciate if someone could help me or had suggestions for me to try out, because I am at the end of my wits after 6 hours of trying to fix this
Infos on my config:
exp --version 50.0.1
After deleting node_modules and clearing the packager cache (like described here: https://forums.expo.io/t/how-to-clear-the-react-native-packager/1352), I can reproduce the error (o is not a function) while simulating with
Running in Expo App with
--dev --no-minify is working again. So the error seems to happen in some optimization step.
exp --no-dev --no-minify next… stay tuned
Alright folks, I finally got an error to work with, which led me to https://github.com/infinitered/reactotron/issues/483, I had Reactotron configured conditionally when in dev mode, which was of course not initialized when in prod mode which led enhanceReducers to fail because the Reactotron middleware was not defined.
This seems to have been the issue, building right now and hoping that I am good to go again.
What I learned from this: Be more careful with your
if(__DEV__) usage, keep cool and always exhaust your own possible points of failure before starting to look for errors in your toolchain.
Most helpful command:
exp r --no-dev --no-minify
I wished that this process would have been more straightforward though, had I known the --no-dev --no-minify option from the start, I had found the error in 10 minutes instead of a whole day.
All in all, thanks to the Expo team for this great piece of software, I really love working with Expo and it never let me down so far.
I can confirm that this was really the issue, yay for me I guess.
What is left however: Why is such an error not happening / encountered sooner (i.e. in the bundling and preparation step locally or then on the servers)? That might be worth investigating.