TypeError: undefined is not an object (evaluating '_expo.Expo.Facebook')

#1

Please Help. I am getting
‘[Unhandled promise rejection: TypeError: undefined is not an object (evaluating ‘_expo.Expo.Facebook’)]’

when trying to use the following in an async function. It was working properly a week ago.

const { type, token } = await Expo.Facebook.logInWithReadPermissionsAsync(MY_APP_ID,{ permissions: [‘public_profile’,‘email’] });

#2

Hey there,

Make sure your file is importing Expo somewhere, and that the Expo dependency is present in package.json and node_modules. If you’re still stuck, it would be helpful if you could create a Snack that minimally reproduces the problem.

1 Like
#3

Hello,

I was having the same issue, what fixed it for me was changing the way I was importing Expo.

Before:
import { Expo } from “expo”;

After:
import Expo from “expo”;

3 Likes
closed #4

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