invertase / react-native-apple-authentication

A React Native library providing support for Apple Authentication on iOS and Android.
Other
1.36k stars 215 forks source link

Prop types seems to be a peer dep #307

Closed zRelux closed 8 months ago

zRelux commented 1 year ago

When trying to run the app after installing the package I got this.

Unable to resolve "prop-types" from "node_modules/@invertase/react-native-apple-authentication/..."

And my package.json looks like this

{
  "name": "roadtoadonis",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@invertase/react-native-apple-authentication": "^2.2.2",
    "@react-native-firebase/app": "^16.2.0",
    "@react-native-firebase/auth": "^16.2.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.1",
    "expo": "~46.0.16",
    "expo-build-properties": "~0.3.0",
    "expo-dev-client": "~1.3.0",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",
    "nativewind": "^2.0.11",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.6",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-svg": "12.3.0",
    "react-native-web": "~0.18.7"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/react": "~18.0.0",
    "@types/react-native": "~0.69.1",
    "tailwindcss": "^3.2.1",
    "typescript": "^4.6.3"
  },
  "private": true
}

Had to install prop-types to fix the issue but if possible I wouldn't want to

mikehardy commented 1 year ago

    "expo": "~46.0.16",
    "expo-build-properties": "~0.3.0",
    "expo-dev-client": "~1.3.0",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",

simpler solution, I wager: https://docs.expo.dev/versions/latest/sdk/apple-authentication/

xzilja commented 1 year ago

@mikehardy only problem with expo one is that there is no fallback for android flows via webview.

mikehardy commented 8 months ago

I think you might be correct that https://www.npmjs.com/package/deprecated-react-native-prop-types needs to be a peer dep currently. Is something that you still notice? Happy to take a PR to resolve it if so, otherwise / given age of this issue going to close