th3rdwave / react-native-safe-area-context

A flexible way to handle safe area insets in JS. Also works on Android and Web!
MIT License
2.08k stars 191 forks source link

Expo SDK 50, React Native, Cannot read properties of null (reading 'declarations') #484

Closed chakafasano88 closed 2 months ago

chakafasano88 commented 3 months ago

Description I built an application using "react-native": "0.73.6", and "expo": "^50.0.0". My current version is "react-native-safe-area-context": "4.8.2".

Upon running my application with a development build I receive the following error: node_modules/react-native-safe-area-context/src/specs/NativeSafeAreaView.ts: Cannot read properties of null (reading 'declarations').

Has someone else had this issues? If this issue occurring with expo SDK 50?

jagatjeeban commented 2 months ago

Facing the same issue for CLI also. @chakafasano88 Did you find any solution for this?

chakafasano88 commented 2 months ago

@jagatjeeban Honestly, its difficult to say how I fixed this issue. I cleared my node modules and lock files many times and re-installed with different versions of node. I do recall updating react-native-gifted chat to the latest version. That package has its own safe area dependency. Are you using react-native-gifted-chat?

Can you copy and paste your exact error?

jagataess commented 2 months ago

error: node_modules/react-native-safe-area-context/src/specs/NativeSafeAreaView.ts: /Users/jagatjeebanmaharana/ReactNative/YouTubeClone/node_modules/react-native-safe-area-context/src/specs/NativeSafeAreaView.ts: Cannot read properties of null (reading 'declarations')

This is the exact error I'm getting and no, I'm not using react-native-gifted-chat. I've also removed and reinstalled my node modules multiple times but nothing helped. @chakafasano88