2
votes

I upgraded expo for my React Native App from SDK25 to SDK32 directly following the steps explained on the Expo Documentation. When i try to run the app into the Expo client, i get the following error

undefined is not an object (evaluating '_expo2.default.KeepAwake') <unknown> crna-entry.js:20:17 loadModuleImplementation require.js:292:12 guardedLoadModule require.js:179:45 global code <unknown file>:0

Environment

2

2 Answers

4
votes

Remove react-native-scripts and update main key

0
votes

Upgrading your project to use Expo CLI.

Make these changes to package.json:

Replace react-native-scripts with expo in the scripts config. Example:

"scripts": {
    "start": "expo start",
    "eject": "expo eject",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "test": "jest"
}

Remove react-native-scripts from devDependencies.

Change the main key to node_modules/expo/AppEntry.js then run npm start -- -c