TS2786: 'SafeAreaView' cannot be used as a JSX component. Its instance type 'SafeAreaView' is not a valid JSX element.
Is just one example of a react native component getting this TS error in my code, I also get it on View, Text etc...
I think it has something to do with my package.json:
{"main": "node_modules/expo/AppEntry.js","scripts": {"start": "expo start","android": "expo start --android","ios": "expo start --ios","web": "expo start --web","eject": "expo eject","test": "jest --passWithNoTests","tsc": "tsc --pretty","check-all": "yarn run tsc && yarn run test" },"dependencies": {"@react-navigation/bottom-tabs": "^6.5.7","@react-navigation/native": "^6.1.6","@react-navigation/native-stack": "^6.9.12","@testing-library/react-native": "^12.0.0-rc.0","expo": "~42.0.1","expo-status-bar": "~1.0.4","jest-expo": "^48.0.1","react": "16.13.1","react-dom": "16.13.1","react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz","react-native-safe-area-context": "4.5.0","react-native-screens": "~3.20.0","react-native-web": "~0.13.12" },"devDependencies": {"@babel/core": "^7.21.0","@babel/preset-env": "^7.20.2","@babel/preset-react": "^7.18.6","@babel/preset-typescript": "^7.21.0","@types/jest": "^29.4.0","@types/react": "~18.0.27","@types/react-native": "~0.63.2","@types/react-test-renderer": "^18.0.0","babel-jest": "^29.4.3","babel-preset-expo": "^9.3.0","jest": "^29.2.1","prettier": "2.8.4","react-test-renderer": "^18.2.0","ts-jest": "^29.0.5","typescript": "^4.9.4" },"private": true}
Does anyone know how to fix this?