Upgrading Expo 42 SDK to 43 (or 44)

  1. SDK Version: 44
  2. Platforms(Android/iOS/web/all): all
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

I’ve updated Expo 42 to 44 and got error "Unhandled JS Exception: Unexpected identifier ‘_classCallCheck’. import call expects exactly one argument.

no stack"

But if I start new expo project it will work. How I can update my expo without headache?

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.


I’m experiencing the same issue… I’m trying incrementally to increase from SDK32 TO SDK33 and I simply cannot because of this… This issue is listed here as well Unhandled JS Exception: Unexpected identifier 'invariant'. import call expects exactly one argument. no stack · Issue #32888 · facebook/react-native · GitHub

Hi @7alcon and @nmenic01

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.

Good luck

1 Like

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.

1 Like

I don’t think you need to install that yourself.

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.

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