Cannot read property 'back' of undefined

Please provide the following:

  1. SDK Version: 48
  2. Platforms(Android/iOS/web/all): Android

After upgrading from 47 to expo sdk 48, ‘expo-camera’ gave the following error:

I tried to create a ‘minimal reproducible’ but I couldn’t, I’m using react-navigation, but I’m not sure if this is a relevant fact, I just suspect it, because my component renders normally without it

Could it be something related to this documentation?

Hi @nappsolutions

That’s weird. I’m not sure what’s going on, but I don’t think it is about having multiple previews active at the same time.

You mean if you remove React Navigation then the camera works OK?

Try running npx expo-doctor and npx expo install --check

In expo-doctor it looks like an error with prettier that I don’t quite understand


What do your scripts look like? I think that warning is saying that you have a script called "prettier" and you also have a binary called “prettier”.

Maybe try deleting your node_modules and yarn.lock / package-lock.json and reinstall your dependencies. Then try npx expo-doctor again. (Maybe first rename your "prettier" script)

right, it’s my script with name prettier than that warning
however I will still better evaluate the error of expo camera


Did you try this before running npx expo-doctor again?

Also you did not answer this question.

Yes, with the removal of the navigation implementation it works, leaving only one screen (in this case the camera screen), but I’m not sure if this is something about the navigation, or something because there are other screens that implement other libs like expo -image-picker, expo-image-manipulator

and about ‘reinstalling your dependencies.’ did not work

OK, that’s weird. Are you able to create a simple test app with React Navigation and a camera screen to see if that works? If it doesn’t, maybe you can post the source code for the test app so that others can try it out and help to debug the issue.

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