New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDK32] undefined is not an object (evaluating '_expo2.default.KeepAwake') #3152
Comments
Same error happen to me, upgrading from expo version 29 to 32. |
Same issue even with expo-cli@canary Expo CLI 2.6.15-alpha.6 environment info: |
same here |
How are you importing You should use destructured imports |
In our application we are not importing |
@gauravverma so maybe one of your dependencies is doing that? Could you post here the |
Looks like this was related to
Change the I must have been using an old package.json setup 😅 |
I guess |
I think the removal of |
Thank you @Ripe, removing react-native-scripts and updating the main key of packages.json fixed it for me! |
I can confirm removing |
@Ripe Thank You SO Much for the fix!!! It works now 🙏 |
I got this issue, and my package.json doesn't even have eact-native-scripts {
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll",
"lint": "eslint components"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/samples": "2.1.1",
"@react-native-community/async-storage": "^1.3.3",
"expo": "^32.0.0",
"i18next": "^15.1.0",
"react": "16.5.0",
"react-i18next": "^10.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-google-places-autocomplete": "^1.3.9",
"react-native-maps": "^0.24.2",
"react-native-table-component": "^1.2.0",
"react-navigation": "^3.0.9"
},
"devDependencies": {
"babel-eslint": "^10.0.1",
"babel-preset-expo": "^5.0.0",
"eslint": "^5.16.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-json": "^1.4.0",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-native": "^3.6.0",
"eslint_d": "^7.3.0",
"jest-expo": "^32.0.0"
},
"private": true
}
|
i have done all the above things but still facing the same issue |
to me what solved it was importing the permissions and imagePicker like this:
instead of this:
|
Same here. After resolving "TypeError: undefined is not an object (evaluating 'Expo.SecureStore.getItemAsync')", I get "TypeError: undefined is not an object (evaluating '_expo.default.SecureStore')". |
Same issue here. I tried everything from above. I don't have react-native-scripts on the package.json. The error comes from undefined is not an object (evaluating 'new _expo.Audio.Sound')
|
Hey @SK-DNS-NET and @leovazquezz1, |
Hi, I'm getting this error. My scripts look like this and I'm importing as in but I'm still getting [Unhandled promise rejection: TypeError: undefined is not an object (evaluating 'Expo.Permissions.getAsync')] What can I do? :( |
How about non-expo projects? What's the solution? |
Environment
Expo CLI 2.6.14 environment info:
System:
OS: macOS 10.14.2
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.9.1 - /usr/local/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
expo: ^32.0.0 => 32.0.0
react: 16.5.0 => 16.5.0
react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1
react-navigation: ^3.0.9 => 3.0.9
npmGlobalPackages:
expo-cli: 2.6.14
I'm running my app in the Expo client (newly installed) in the iOS Simulator (iPhone 7).
Steps to Reproduce
I followed the upgrade path from SDK31 to SDK32.
Expected Behavior
I should be able to display my app in the Expo client.
Actual Behavior
My app seems to be running (I get logs in my terminal), but the simulator displays a red screen. Dismissing the screen doesn't show the app. No "extra info".
Reproducible Demo
Sorry, I cannot share my project or a reproducible demo at this time.
The text was updated successfully, but these errors were encountered: