Hey @7alcon, I’d recommend reading through our debugging docs as well as upgrading SDK versions incrementally so you can more accurately hone in on the cause of the issue.
Off hand I don’t know what’s causing this, but, what dependencies are you using and what do all of your import statements look like?
Also, do you have “_classCallCheck” or “invariant” anywhere in your code?
Maybe clearing caches will help:
See if any of the other troubleshooting/debugging docs help figure it out.
As a last resort you could try creating a new blank app and comparing the package.json and other files with your real app. If that doesn’t help, try “bisecting” your code to find where the error(s) is/are coming from.
e.g. try commenting out half of your code and see if the problem still happens. If it does, try uncommenting it and commenting out the other half. Does the error still happen? If so, is it still exactly the same? If it still happens, try commenting out more of the app until you get to a point where it doesn’t give you the error. Then try adding stuff back in until it appears again. That should help you to narrow down where the error is coming from.
Another thing to try:
Create a new blank app and start copying code from the real app. You can start by copying all the code to see if the problem still happens or not. If it does, then try copying only small parts of the code at a time until the problem starts happening again.
Doing things like the above should help you to figure out what’s happening. If the problem is in your code it would be helpful for you to post about it so that we can all learn what caused it. If the problem is with Expo or React Native then the above troubleshooting should allow you to create a small example that has the same error and you can create a bug report.
Oh… After a week of looking for a found the solution. I used to “metro-react-native-babel-preset”: “^0.53.1”, which broke my app. I’ve just updated this npm package and all is work now.
react-native depends on metro-react-native-babel-transformer, which depends on metro-react-native-babel-preset.
e.g. if you create a new app with expo init you will see no explicit mention of metro-react-native-babel-preset, and yarn or npm install will automatically install the correct version.