1

I want to use epubjs-rn library. [link:https://github.com/futurepress/epubjs-rn]

So, I set up all libraries just like that epubjs-rn.

when I downgrade react-native version 0.59.9, it makes errors

1.

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ViewerTest.xcworkspace

Invalid Podfile file: cannot load such file -- /myPath/node_modules/react-native/scripts/react_native_pods

I try to fix it.

1. React Native - pod install issue "cannot load such file.......node_modules/react-native/scripts/react_native_pods"

  1. delete code in ios/podfile delete code in ios pod file

my package.json is

  {
  "name": "ViewerTest",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@lightbase/react-native-orientation": "^3.2.1",
    "@react-native-community/async-storage": "^1.5.0",
    "epubjs-rn": "^0.1.5",
    "metro": "^0.67.0",
    "react": "^16.8.3",
    "react-native": "^0.59.9",
    "react-native-static-server": "^0.5.0",
    "react-native-webview": "^5.12.0",
    "react-native-zip-archive": "^4.1.1",
    "rn-fetch-blob": "^0.10.15"
  },
  "devDependencies": {
    "@babel/core": "^7.17.0",
    "@babel/runtime": "^7.17.0",
    "@react-native-community/eslint-config": "^3.0.1",
    "babel-jest": "^27.5.0",
    "eslint": "^8.8.0",
    "jest": "^27.5.0",
    "metro-react-native-babel-preset": "^0.67.0",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}

When I install react-native@0.59.9, there is no podfile in ios directory

my Xcode version is 12.5.1 :(

plz help me and sorry about that i'm not good at english.

thanks !

Jerry
  • 41
  • 1
  • 6

1 Answers1

-1

I faced this issue with React Native version 0.61.2 and this worked for me. Navigate to the ios folder of the app and run the command pod install Once that is done, go back to the root directory and run react-native run-ios

OR

cd ios
rm -rf build/
pod install
cd ..

Try these solutions.

Muhammad Umar
  • 190
  • 1
  • 3
  • 15