ScreenOrientation since upgrade to SDK38

Upgraded from SDK 36 to 38.
Getting
undefined is not an object (evaluation ‘_expo.ScreenOrientation.Orientation’)

I have not changed the import as instructed for SDK38 because I am not deliberately using screen orientation so wouldn’t know where to import it.

I deleted the npm library, cleared out my app.json, ran expo start and used expo install for all the modules it was missing.

Any ideas, please, as I am stuck? Thanks.

Here are the modules I am using:

“dependencies”: {
@expo/match-media”: “0.0.0-beta.2”,
@expo/vector-icons”: “^10.0.0”,
@react-native-community/async-storage”: “~1.11.0”,
@react-native-community/masked-view”: “0.1.10”,
@react-navigation/bottom-tabs”: “^5.7.1”,
@react-navigation/drawer”: “^5.8.5”,
@react-navigation/material-bottom-tabs”: “^5.2.13”,
@react-navigation/native”: “^5.6.1”,
@react-navigation/stack”: “^5.7.0”,
“axios”: “^0.19.2”,
“expo”: “~38.0.8”,
“expo-asset”: “~8.1.7”,
“expo-constants”: “~9.1.1”,
“expo-font”: “~8.2.1”,
“expo-linking”: “^1.0.1”,
“expo-splash-screen”: “~0.3.1”,
“expo-status-bar”: “^1.0.2”,
“expo-web-browser”: “~8.3.1”,
“js-base64”: “^3.2.3”,
“moment”: “^2.27.0”,
“react”: “~16.11.0”,
“react-dom”: “~16.11.0”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz”,
“react-native-awesome-alerts”: “^1.3.3”,
“react-native-elements”: “^2.0.4”,
“react-native-gesture-handler”: “~1.6.0”,
“react-native-modal”: “^11.5.6”,
“react-native-paper”: “^4.0.1”,
“react-native-platform-touchable”: “^1.1.1”,
“react-native-reanimated”: “~1.9.0”,
“react-native-render-html”: “^4.2.1”,
“react-native-responsive-fontsize”: “^0.4.3”,
“react-native-safe-area-context”: “~3.0.7”,
“react-native-safe-area-view”: “^1.1.1”,
“react-native-scalable-image”: “^1.0.0”,
“react-native-screens”: “~2.9.0”,
“react-native-search-filter”: “^0.1.5”,
“react-native-web”: “~0.11.7”,
“react-navigation-header-buttons”: “^4.0.2”,
“react-redux”: “^7.2.0”,
“react-responsive”: “^8.1.0”,
“redux”: “^4.0.5”,
“redux-persist”: “^6.0.0”,
“redux-saga”: “^1.1.3”,
“sentry-expo”: “^2.1.2”,
“expo-screen-orientation”: “~1.1.1”,
“react-native-webview”: “9.4.0”
},
“devDependencies”: {
@babel/core”: “^7.8.6”,
@types/react”: “~16.9.23”,
@types/react-native”: “~0.62.13”,
“babel-preset-expo”: “~8.1.0”,
“jest-expo”: “~38.0.0”,
“typescript”: “~3.9.5”
},

Answering my own issue in case it helps others…

The updates module was extracted into its own module in SDK, as documented here:
New Updates module API

I hadn’t spotted that. Fixing that issue made the apparent problem with the screen module go away.

1 Like

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