2

Environment:

Windows 10
Node js: 10.x
Expo: 35.0.0
React: 16.8
React-native: 0.62.0
React-navigation: 3.0.7

A simple app developed to test navigation on android app, facing the below error:

"TypeError: Cannot read property 'measureInWindow' of undefined"

Any suggestion would be appreciated. Thank you,

Chetan
  • 21
  • 1
  • 6
  • 1
    getting the same error here after I updated from react-native 0.59 to 0.62. Still haven't found a solution – Hoffmann Apr 06 '20 at 15:53
  • 1
    For me the problem seems to be related to the version of react-native-safe-area-view that react-navigation is using is incompatible with react-native 0.62. Haven't tried yet but I think updating react-navigation should solve the issue – Hoffmann Apr 06 '20 at 15:56
  • 1
    Thank you @Hoffmann. It is resolved with react-navigation@5.x It was due to version conflict between react-native and react-navigation. Now, they are updated. – Chetan Apr 07 '20 at 02:18
  • 1
    No problem @Chetan, for anyone else running into this, updating to react-navigation v4 also works (v4 is not as big of a breaking change as v5) – Hoffmann Apr 20 '20 at 09:41

1 Answers1

-1

install react-native-safe-area-view

following is the command to install react-native-safe-area-view:

npm i react-native-safe-area-view

for more info: https://www.npmjs.com/package/react-native-safe-area-view

  • 1
    OP could probably benifit from an explanation of why he receives this error and how the package you linked to solves this. – JonC May 14 '20 at 06:35
  • React Navigation internally use react-native-safe-area-view and the measureInWindow is from the safe area view. so it cause error without it – S H I V A May 15 '20 at 05:21