TypeError: Expo is not a constructor

#1

I am trying to use the `expo-server-sdk-node and following the example however I am getting this error:

TypeError: Expo is not a constructor

Looks like my NodeJS server is not liking the new Expo() constructor.

I am importing the library like this:

const Expo = require("expo-server-sdk");

What is the issue?

#2

Hey @jamesattard,

You’ll have to change your import method. Take a look at the 3.0.0 release notes here for the potential options: https://github.com/expo/expo-server-sdk-node/releases

Cheers,

Adam

#3

Never mind… I had to import it as follows:

const Expo = require("expo-server-sdk").Expo;

closed #4

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