Skip to content

Invalid Podfile file: undefined method `[]' for nil:NilClass. #860

Closed

Description

@sibelius

Environment

System:
    OS: macOS 10.15.1
    CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
    Memory: 62.27 MB / 16.00 GB
    Shell: 5.0.11 - /usr/local/bin/bash
  Binaries:
    Node: 12.13.0 - /var/folders/n_/30jh5m816yzg3_cftvg647j40000gn/T/yarn--1574276617063-0.927548752503313/node
    Yarn: 1.19.1 - /var/folders/n_/30jh5m816yzg3_cftvg647j40000gn/T/yarn--1574276617063-0.927548752503313/yarn
    npm: 6.13.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 22, 23, 24, 25, 26, 27, 28
      Build Tools: 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 27.0.3, 28.0.0, 28.0.3
      System Images: android-25 | Android TV Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-N | Android TV Intel x86 Atom, android-N | Android Wear ARM EABI v7a, android-N | Android Wear Intel x86 Atom, android-N | Intel x86 Atom, android-N | Intel x86 Atom_64, android-P | Google Play Intel x86 Atom
      Android NDK: 20.1.5948944
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5977832
    Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
  npmPackages:
    @react-native-community/cli: 3.0.4 => 3.0.4 
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.4 => 0.61.4 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-create-library: 3.1.2
    react-native-git-upgrade: 0.2.7

Description

[!] Invalid `Podfile` file: undefined method `[]' for nil:NilClass.

 #  from /app/packages/app/ios/Podfile:57
 #  -------------------------------------------
 #    # react_native_firebase!
 >    use_native_modules!
 #  end
 #  -------------------------------------------

Reproducible Demo

my podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'

# plugin 'cocoapods-fix-react-native'git st
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
# require_relative '../node_modules/@react-native-firebase/app/pod_config'

project 'app', { 'Alpha' => :release, 'Staging' => :release }

target 'app' do
  # Comment the next line if you don't want to use dynamic frameworks
  # use_frameworks!

  # Pods for app
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  # pod 'React-RCTLinking', :podspec => '../node_modules/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec'

  pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios/RNFirebase.podspec'

  pod 'Firebase/Core'
  pod 'Firebase/Messaging'

 target 'appTests' do
    inherit! :search_paths
    # Pods for testing
  end

  # react_native_firebase!
  use_native_modules!
end

target 'app-tvOS' do
  # Comment the next line if you don't want to use dynamic frameworks
  # use_frameworks!

  # Pods for app-tvOS

  target 'app-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

this is a monorepo setup

this is a list of react-native packages used

"@react-native-community/async-storage": "1.6.3",
"@react-native-community/cameraroll": "^1.3.0",
"@react-native-community/cli": "3.0.4",
    "@react-native-community/cli-platform-android": "3.0.3",
    "@react-native-community/cli-platform-ios": "3.0.0",
"react-native-camera": "3.11.1",
    "react-native-device-info": "5.3.1",
    "react-native-document-picker": "3.2.4",
"react-native-firebase": "5.5.6",
    "react-native-gesture-handler": "1.5.0",
    "react-native-image-resizer": "1.1.0",
"react-native-linear-gradient": "2.5.6",
    "react-native-localization": "2.1.6",
    "react-native-reanimated": "1.4.0",
    "react-native-screens": "2.0.0-alpha.11",
    "react-native-splash-screen": "3.2.0",
    "react-native-svg": "9.13.3",
    "react-native-tts": "3.0.0",
    "react-native-voice": "git+https://github.com/wenkesj/react-native-voice.git#62a3a0e40fece93c0d4b5c664d563207a960ef87",
    "react-native-webview": "7.5.1",
    "reanimated-bottom-sheet": "1.0.0-alpha.16",
    ```

Activity

  1. thymikee commented on Nov 20, 2019

    @thymikee
    Member

    When did it start happening? Can you provide a repro? Running npx react-native config would be helpful as well

  2. sibelius commented on Nov 20, 2019

    @sibelius
    MemberAuthor

    we upgrade from cli v2 to cli v3

    image

    npx react-native config

    {
      "root": "/app/packages/app",
      "reactNativePath": "/app/packages/app/node_modules/react-native",
      "dependencies": {
        "@app/core": {
          "root": "/app/packages/core",
          "name": "@app/core",
          "platforms": {
            "ios": null,
            "android": null
          },
          "assets": [
            "/app/packages/core/src/assets/fonts/Montserrat-Bold.ttf",
            "/app/packages/core/src/assets/fonts/Montserrat-Regular.ttf",
            "/app/packages/core/src/assets/fonts/Montserrat-SemiBold.ttf",
            "/app/packages/core/src/assets/fonts/OpenSans-Bold.ttf",
            "/app/packages/core/src/assets/fonts/OpenSans-Regular.ttf",
            "/app/packages/core/src/assets/fonts/OpenSans-SemiBold.ttf"
          ],
          "hooks": {},
          "params": []
        },
        "@react-native-community/async-storage": {
          "root": "/app/packages/app/node_modules/@react-native-community/async-storage",
          "name": "@react-native-community/async-storage",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/@react-native-community/async-storage/ios",
              "folder": "/app/packages/app/node_modules/@react-native-community/async-storage",
              "pbxprojPath": "/app/packages/app/node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/@react-native-community/async-storage/RNCAsyncStorage.podspec",
              "projectPath": "/app/packages/app/node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.xcodeproj",
              "projectName": "RNCAsyncStorage.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/@react-native-community/async-storage/android",
              "folder": "/app/packages/app/node_modules/@react-native-community/async-storage",
              "packageImportPath": "import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;",
              "packageInstance": "new AsyncStoragePackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "@react-native-community/cameraroll": {
          "root": "/app/packages/app/node_modules/@react-native-community/cameraroll",
          "name": "@react-native-community/cameraroll",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/@react-native-community/cameraroll/ios",
              "folder": "/app/packages/app/node_modules/@react-native-community/cameraroll",
              "pbxprojPath": "/app/packages/app/node_modules/@react-native-community/cameraroll/ios/RNCCameraRoll.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/@react-native-community/cameraroll/react-native-cameraroll.podspec",
              "projectPath": "/app/packages/app/node_modules/@react-native-community/cameraroll/ios/RNCCameraRoll.xcodeproj",
              "projectName": "RNCCameraRoll.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/@react-native-community/cameraroll/android",
              "folder": "/app/packages/app/node_modules/@react-native-community/cameraroll",
              "packageImportPath": "import com.reactnativecommunity.cameraroll.CameraRollPackage;",
              "packageInstance": "new CameraRollPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-app-auth": {
          "root": "/app/packages/app/node_modules/react-native-app-auth",
          "name": "react-native-app-auth",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-app-auth/ios",
              "folder": "/app/packages/app/node_modules/react-native-app-auth",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-app-auth/ios/RNAppAuth.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-app-auth/react-native-app-auth.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-app-auth/ios/RNAppAuth.xcodeproj",
              "projectName": "RNAppAuth.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-app-auth/android",
              "folder": "/app/packages/app/node_modules/react-native-app-auth",
              "packageImportPath": "import com.rnappauth.RNAppAuthPackage;",
              "packageInstance": "new RNAppAuthPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-camera": {
          "root": "/app/packages/app/node_modules/react-native-camera",
          "name": "react-native-camera",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-camera/ios",
              "folder": "/app/packages/app/node_modules/react-native-camera",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-camera/ios/RNCamera.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-camera/react-native-camera.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-camera/ios/RNCamera.xcodeproj",
              "projectName": "RNCamera.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-camera/android",
              "folder": "/app/packages/app/node_modules/react-native-camera",
              "packageImportPath": "import org.reactnative.camera.RNCameraPackage;",
              "packageInstance": "new RNCameraPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-device-info": {
          "root": "/app/packages/app/node_modules/react-native-device-info",
          "name": "react-native-device-info",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-device-info/ios",
              "folder": "/app/packages/app/node_modules/react-native-device-info",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-device-info/RNDeviceInfo.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-device-info/ios/RNDeviceInfo.xcodeproj",
              "projectName": "RNDeviceInfo.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-device-info/android",
              "folder": "/app/packages/app/node_modules/react-native-device-info",
              "packageImportPath": "import com.learnium.RNDeviceInfo.RNDeviceInfo;",
              "packageInstance": "new RNDeviceInfo()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-document-picker": {
          "root": "/app/packages/app/node_modules/react-native-document-picker",
          "name": "react-native-document-picker",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-document-picker/ios",
              "folder": "/app/packages/app/node_modules/react-native-document-picker",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-document-picker/ios/RNDocumentPicker.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-document-picker/react-native-document-picker.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-document-picker/ios/RNDocumentPicker.xcodeproj",
              "projectName": "RNDocumentPicker.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-document-picker/android",
              "folder": "/app/packages/app/node_modules/react-native-document-picker",
              "packageImportPath": "import io.github.elyx0.reactnativedocumentpicker.DocumentPickerPackage;",
              "packageInstance": "new DocumentPickerPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-firebase": {
          "root": "/app/packages/app/node_modules/react-native-firebase",
          "name": "react-native-firebase",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-firebase/ios",
              "folder": "/app/packages/app/node_modules/react-native-firebase",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-firebase/ios/RNFirebase.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-firebase/ios/RNFirebase.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-firebase/ios/RNFirebase.xcodeproj",
              "projectName": "RNFirebase.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-firebase/android",
              "folder": "/app/packages/app/node_modules/react-native-firebase",
              "packageImportPath": "import io.invertase.firebase.RNFirebasePackage;",
              "packageInstance": "new RNFirebasePackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-gesture-handler": {
          "root": "/app/packages/app/node_modules/react-native-gesture-handler",
          "name": "react-native-gesture-handler",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-gesture-handler/ios",
              "folder": "/app/packages/app/node_modules/react-native-gesture-handler",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-gesture-handler/RNGestureHandler.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj",
              "projectName": "RNGestureHandler.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-gesture-handler/android",
              "folder": "/app/packages/app/node_modules/react-native-gesture-handler",
              "packageImportPath": "import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;",
              "packageInstance": "new RNGestureHandlerPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-image-resizer": {
          "root": "/app/packages/app/node_modules/react-native-image-resizer",
          "name": "react-native-image-resizer",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-image-resizer/ios",
              "folder": "/app/packages/app/node_modules/react-native-image-resizer",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-image-resizer/ios/RCTImageResizer.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-image-resizer/react-native-image-resizer.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-image-resizer/ios/RCTImageResizer.xcodeproj",
              "projectName": "RCTImageResizer.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-image-resizer/android",
              "folder": "/app/packages/app/node_modules/react-native-image-resizer",
              "packageImportPath": "import fr.bamlab.rnimageresizer.ImageResizerPackage;",
              "packageInstance": "new ImageResizerPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-linear-gradient": {
          "root": "/app/packages/app/node_modules/react-native-linear-gradient",
          "name": "react-native-linear-gradient",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-linear-gradient",
              "folder": "/app/packages/app/node_modules/react-native-linear-gradient",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-linear-gradient/BVLinearGradient.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-linear-gradient/BVLinearGradient.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-linear-gradient/BVLinearGradient.xcodeproj",
              "projectName": "BVLinearGradient.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-linear-gradient/android",
              "folder": "/app/packages/app/node_modules/react-native-linear-gradient",
              "packageImportPath": "import com.BV.LinearGradient.LinearGradientPackage;",
              "packageInstance": "new LinearGradientPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-localization": {
          "root": "/app/packages/app/node_modules/react-native-localization",
          "name": "react-native-localization",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-localization/ios",
              "folder": "/app/packages/app/node_modules/react-native-localization",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-localization/ios/ReactNativeLocalization.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-localization/ReactNativeLocalization.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-localization/ios/ReactNativeLocalization.xcodeproj",
              "projectName": "ReactNativeLocalization.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-localization/android",
              "folder": "/app/packages/app/node_modules/react-native-localization",
              "packageImportPath": "import com.babisoft.ReactNativeLocalization.ReactNativeLocalizationPackage;",
              "packageInstance": "new ReactNativeLocalizationPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-reanimated": {
          "root": "/app/packages/app/node_modules/react-native-reanimated",
          "name": "react-native-reanimated",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-reanimated/ios",
              "folder": "/app/packages/app/node_modules/react-native-reanimated",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-reanimated/ios/RNReanimated.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-reanimated/RNReanimated.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-reanimated/ios/RNReanimated.xcodeproj",
              "projectName": "RNReanimated.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-reanimated/android",
              "folder": "/app/packages/app/node_modules/react-native-reanimated",
              "packageImportPath": "import com.swmansion.reanimated.ReanimatedPackage;",
              "packageInstance": "new ReanimatedPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-screens": {
          "root": "/app/packages/app/node_modules/react-native-screens",
          "name": "react-native-screens",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-screens/ios",
              "folder": "/app/packages/app/node_modules/react-native-screens",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-screens/ios/RNScreens.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-screens/RNScreens.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-screens/ios/RNScreens.xcodeproj",
              "projectName": "RNScreens.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-screens/android",
              "folder": "/app/packages/app/node_modules/react-native-screens",
              "packageImportPath": "import com.swmansion.rnscreens.RNScreensPackage;",
              "packageInstance": "new RNScreensPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-sentry": {
          "root": "/app/packages/app/node_modules/react-native-sentry",
          "name": "react-native-sentry",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-sentry/ios",
              "folder": "/app/packages/app/node_modules/react-native-sentry",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-sentry/ios/RNSentry.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-sentry/SentryReactNative.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-sentry/ios/RNSentry.xcodeproj",
              "projectName": "RNSentry.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [
                "libz.tbd"
              ],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-sentry/android",
              "folder": "/app/packages/app/node_modules/react-native-sentry",
              "packageImportPath": "import io.sentry.RNSentryPackage;",
              "packageInstance": "new RNSentryPackage()"
            }
          },
          "assets": [],
          "hooks": {
            "postlink": "node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android",
            "postunlink": "node node_modules/@sentry/wizard/dist/bin.js -i reactNative -p ios android --uninstall"
          },
          "params": []
        },
        "react-native-share": {
          "root": "/app/packages/app/node_modules/react-native-share",
          "name": "react-native-share",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-share/ios",
              "folder": "/app/packages/app/node_modules/react-native-share",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-share/ios/RNShare.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-share/RNShare.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-share/ios/RNShare.xcodeproj",
              "projectName": "RNShare.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-share/android",
              "folder": "/app/packages/app/node_modules/react-native-share",
              "packageImportPath": "import cl.json.RNSharePackage;",
              "packageInstance": "new RNSharePackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-splash-screen": {
          "root": "/app/packages/app/node_modules/react-native-splash-screen",
          "name": "react-native-splash-screen",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-splash-screen/ios",
              "folder": "/app/packages/app/node_modules/react-native-splash-screen",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-splash-screen/ios/SplashScreen.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-splash-screen/react-native-splash-screen.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-splash-screen/ios/SplashScreen.xcodeproj",
              "projectName": "SplashScreen.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-splash-screen/android",
              "folder": "/app/packages/app/node_modules/react-native-splash-screen",
              "packageImportPath": "import org.devio.rn.splashscreen.SplashScreenReactPackage;",
              "packageInstance": "new SplashScreenReactPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-svg": {
          "root": "/app/packages/app/node_modules/react-native-svg",
          "name": "react-native-svg",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-svg/ios",
              "folder": "/app/packages/app/node_modules/react-native-svg",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-svg/ios/RNSVG.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-svg/RNSVG.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-svg/ios/RNSVG.xcodeproj",
              "projectName": "RNSVG.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-svg/android",
              "folder": "/app/packages/app/node_modules/react-native-svg",
              "packageImportPath": "import com.horcrux.svg.SvgPackage;",
              "packageInstance": "new SvgPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-tts": {
          "root": "/app/packages/app/node_modules/react-native-tts",
          "name": "react-native-tts",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-tts/ios",
              "folder": "/app/packages/app/node_modules/react-native-tts",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-tts/ios/TextToSpeech.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-tts/TextToSpeech.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-tts/ios/TextToSpeech.xcodeproj",
              "projectName": "TextToSpeech.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-tts/android",
              "folder": "/app/packages/app/node_modules/react-native-tts",
              "packageImportPath": "import net.no_mad.tts.TextToSpeechPackage;",
              "packageInstance": "new TextToSpeechPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-voice": {
          "root": "/app/packages/app/node_modules/react-native-voice",
          "name": "react-native-voice",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-voice/ios",
              "folder": "/app/packages/app/node_modules/react-native-voice",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-voice/ios/Voice.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-voice/react-native-voice.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-voice/ios/Voice.xcodeproj",
              "projectName": "Voice.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-voice/android",
              "folder": "/app/packages/app/node_modules/react-native-voice",
              "packageImportPath": "import com.wenkesj.voice.VoicePackage;",
              "packageInstance": "new VoicePackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        },
        "react-native-webview": {
          "root": "/app/packages/app/node_modules/react-native-webview",
          "name": "react-native-webview",
          "platforms": {
            "ios": {
              "sourceDir": "/app/packages/app/node_modules/react-native-webview/ios",
              "folder": "/app/packages/app/node_modules/react-native-webview",
              "pbxprojPath": "/app/packages/app/node_modules/react-native-webview/ios/RNCWebView.xcodeproj/project.pbxproj",
              "podfile": null,
              "podspecPath": "/app/packages/app/node_modules/react-native-webview/react-native-webview.podspec",
              "projectPath": "/app/packages/app/node_modules/react-native-webview/ios/RNCWebView.xcodeproj",
              "projectName": "RNCWebView.xcodeproj",
              "libraryFolder": "Libraries",
              "sharedLibraries": [],
              "plist": [],
              "scriptPhases": []
            },
            "android": {
              "sourceDir": "/app/packages/app/node_modules/react-native-webview/android",
              "folder": "/app/packages/app/node_modules/react-native-webview",
              "packageImportPath": "import com.reactnativecommunity.webview.RNCWebViewPackage;",
              "packageInstance": "new RNCWebViewPackage()"
            }
          },
          "assets": [],
          "hooks": {},
          "params": []
        }
      },
      "commands": [
        {
          "name": "log-ios",
          "description": "starts iOS device syslog tail"
        },
        {
          "name": "run-ios",
          "description": "builds your app and starts it on iOS simulator",
          "examples": [
            {
              "desc": "Run on a different simulator, e.g. iPhone 5",
              "cmd": "react-native run-ios --simulator \"iPhone 5\""
            },
            {
              "desc": "Pass a non-standard location of iOS directory",
              "cmd": "react-native run-ios --project-path \"./app/ios\""
            },
            {
              "desc": "Run on a connected device, e.g. Max's iPhone",
              "cmd": "react-native run-ios --device \"Max's iPhone\""
            },
            {
              "desc": "Run on the AppleTV simulator",
              "cmd": "react-native run-ios --simulator \"Apple TV\"  --scheme \"helloworld-tvOS\""
            }
          ],
          "options": [
            {
              "name": "--simulator [string]",
              "description": "Explicitly set simulator to use. Optionally include iOS version betweenparenthesis at the end to match an exact version: \"iPhone 6 (10.0)\"",
              "default": "iPhone X"
            },
            {
              "name": "--configuration [string]",
              "description": "Explicitly set the scheme configuration to use",
              "default": "Debug"
            },
            {
              "name": "--scheme [string]",
              "description": "Explicitly set Xcode scheme to use"
            },
            {
              "name": "--project-path [string]",
              "description": "Path relative to project root where the Xcode project (.xcodeproj) lives.",
              "default": "ios"
            },
            {
              "name": "--device [string]",
              "description": "Explicitly set device to use by name.  The value is not required if you have a single device connected."
            },
            {
              "name": "--udid [string]",
              "description": "Explicitly set device to use by udid"
            },
            {
              "name": "--no-packager",
              "description": "Do not launch packager while building"
            },
            {
              "name": "--verbose",
              "description": "Do not use xcpretty even if installed"
            },
            {
              "name": "--port [number]",
              "default": 8081
            },
            {
              "name": "--terminal [string]",
              "description": "Launches the Metro Bundler in a new window using the specified terminal path."
            }
          ]
        },
        {
          "name": "log-android",
          "description": "starts logkitty"
        },
        {
          "name": "run-android",
          "description": "builds your app and starts it on a connected Android emulator or device",
          "options": [
            {
              "name": "--root [string]",
              "description": "Override the root directory for the android build (which contains the android directory)",
              "default": ""
            },
            {
              "name": "--variant [string]",
              "description": "Specify your app's build variant",
              "default": "debug"
            },
            {
              "name": "--appFolder [string]",
              "description": "Specify a different application folder name for the android source. If not, we assume is \"app\"",
              "default": "app"
            },
            {
              "name": "--appId [string]",
              "description": "Specify an applicationId to launch after build.",
              "default": ""
            },
            {
              "name": "--appIdSuffix [string]",
              "description": "Specify an applicationIdSuffix to launch after build.",
              "default": ""
            },
            {
              "name": "--main-activity [string]",
              "description": "Name of the activity to start",
              "default": "MainActivity"
            },
            {
              "name": "--deviceId [string]",
              "description": "builds your app and starts it on a specific device/simulator with the given device id (listed by running \"adb devices\" on the command line)."
            },
            {
              "name": "--no-packager",
              "description": "Do not launch packager while building"
            },
            {
              "name": "--port [number]",
              "default": 8081
            },
            {
              "name": "--terminal [string]",
              "description": "Launches the Metro Bundler in a new window using the specified terminal path.",
              "default": "Apple_Terminal"
            },
            {
              "name": "--tasks [list]",
              "description": "Run custom Gradle tasks. By default it's \"installDebug\""
            },
            {
              "name": "--no-jetifier",
              "description": "Do not run \"jetifier\" – the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet. See more at: https://www.npmjs.com/package/jetifier.",
              "default": false
            }
          ]
        }
      ],
      "assets": [],
      "platforms": {
        "ios": {},
        "android": {}
      },
      "haste": {
        "providesModuleNodeModules": [
          "react-native"
        ],
        "platforms": [
          "ios",
          "android"
        ]
      },
      "project": {
        "ios": {
          "sourceDir": "/app/packages/app/ios",
          "folder": "/app/packages/app",
          "pbxprojPath": "/app/packages/app/ios/app.xcodeproj/project.pbxproj",
          "podfile": "/app/packages/app/ios/Podfile",
          "podspecPath": null,
          "projectPath": "/app/packages/app/ios/app.xcodeproj",
          "projectName": "app.xcodeproj",
          "libraryFolder": "Libraries",
          "sharedLibraries": [],
          "plist": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "/app/packages/app/android/app",
          "isFlat": false,
          "folder": "/app/packages/app",
          "stringsPath": "/app/packages/app/android/app/src/main/res/values/strings.xml",
          "manifestPath": "/app/packages/app/android/app/src/main/AndroidManifest.xml",
          "buildGradlePath": "/app/packages/app/android/app/build.gradle",
          "settingsGradlePath": "/app/packages/app/android/settings.gradle",
          "assetsPath": "/app/packages/app/android/app/src/main/assets",
          "mainFilePath": "/app/packages/app/android/app/src/main/java/app/myapp/app/MainApplication.java",
          "packageName": "app.myapp.app"
        }
      }
    }
  3. sibelius commented on Nov 21, 2019

    @sibelius
    MemberAuthor

    same error on android

    FAILURE: Build failed with an exception.
    
    * Where:
    Script '/app/packages/app/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 206
    
    * What went wrong:
    A problem occurred evaluating script.
    > React Native CLI failed to determine Android project configuration. This is likely due to misconfiguration. Config output:
      [root:/app/packages/app/android, reactNativePath:/app/packages/app/node_modules/react-native, dependencies:[:], commands:[], assets:[], platforms:[:], haste:[providesModuleNodeModules:[], platforms:[]], project:[:]]
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 28s
    
        at checkExecSyncError (child_process.js:621:11)
        at execFileSync (child_process.js:639:15)
        at runOnAllDevices (/app/packages/app/node_modules/react-native/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:74:39)
        at buildAndRun (/app/packages/app/node_modules/react-native/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41)
        at /app/packages/app/node_modules/react-native/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12
        at processTicksAndRejections (internal/process/task_queues.js:93:5)
        at async Command.handleAction (/app/packages/app/node_modules/react-native/node_modules/@react-native-community/cli/build/cliEntry.js:160:7)
  4. changed the title [-]nvalid `Podfile` file: undefined method `[]' for nil:NilClass.[/-] [+]Invalid `Podfile` file: undefined method `[]' for nil:NilClass.[/+] on Nov 21, 2019
  5. sibelius commented on Nov 21, 2019

    @sibelius
    MemberAuthor

    it is breaking here

    project_root = Pathname.new(config["project"]["ios"]["sourceDir"])

    https://github.com/react-native-community/cli/blob/master/packages/platform-ios/native_modules.rb#L29

    I think this pull request caused the problem:
    #767

    npx --quiet react-native config

    returns

    {
      "root": "/app/packages/app/ios",
      "reactNativePath": "/app/packages/app/node_modules/react-native",
      "dependencies": {},
      "commands": [],
      "assets": [],
      "platforms": {},
      "haste": {
        "providesModuleNodeModules": [],
        "platforms": []
      },
      "project": {}
    }
  6. sibelius commented on Nov 21, 2019

    @sibelius
    MemberAuthor

    I think the problem is that npx --quiet react-native config returns different data when we run it inside app/ios and app

    so, my guess is that react-native config is causing this trouble

  7. sibelius commented on Nov 21, 2019

    @sibelius
    MemberAuthor

    fixed removing

    @react-native-community/cli
    @react-native-community/cli-platform-android
    @react-native-community/cli-platform-ios

    instead I've used the one that react-native 61 depends on

  8. cjam commented on Dec 6, 2019

    @cjam

    I think the problem is that npx --quiet react-native config returns different data when we run it inside app/ios and app

    so, my guess is that react-native config is causing this trouble

    Found the same thing on a project I'm working on. I can't seem to fix it as I am currently using the @react-native-community/cli that comes with the react-native version I'm using.

    I have a monorepo setup as well:

    root
      packages
         mobile
             ios
             android
         web
         shared
    

    if I run npx --quiet react-native config from root or packages the output looks fine, but if I run it from anywhere within mobile I get:

    {
      "root": "/projects/MyProject/packages/mobile",
      "reactNativePath": "/projects/MyProject/node_modules/react-native",
      "dependencies": {},
      "commands": [],
      "assets": [],
      "platforms": {},
      "haste": {
        "providesModuleNodeModules": [],
        "platforms": []
      },
      "project": {}
    }

    Which seems to by why I can't run pod install as it's running the npx --quiet react-native config. Can this be overridden with a config file? Would love to get my project building again.

  9. sibelius commented on Dec 6, 2019

    @sibelius
    MemberAuthor

    @cjam check here #875

  10. cjam commented on Dec 6, 2019

    @cjam

    @cjam check here #875

    Hm. so that's related to the android side of things. It looks like it might be a bug in the react-native config command as it just isn't returning the right information when it's inside the mobile or ios folders. I made the following modification in my node_modules/@react-native-community/cli-platform-ios/native_modules.rb:

     Dir.chdir('../../'){
        IO.popen("npx --quiet react-native config") do |data|
          while line = data.gets
            json << line
          end
        end
     }

    Then ran:

    cd ios
    pod install

    and everything worked. It's a hack of course, but it seems that for some reason the cli can't determine the locations for the native projects when run inside of the mobile or ios folder.

  11. sibelius commented on Dec 6, 2019

    @sibelius
    MemberAuthor

    you can use patch-package until a fix lands

  12. thymikee commented on Feb 18, 2020

    @thymikee
    Member

    @cjam @sibelius this should not be necessary anymore, since in v3.1 we migrated off of npx there.
    Please update the @react-native-community/cli to the latest version.

  13. mikedizon commented on Feb 18, 2020

    @mikedizon

    @thymikee I'm running 3.2.0 and I still get the same error when running pod install

  14. 7 remaining items

  15. thymikee commented on Feb 19, 2020

    @thymikee
    Member

    @mikedizon you have global react-native or react-native-cli or both installed. You need to remove them from npm and yarn and never install again.

  16. mikedizon commented on Feb 19, 2020

    @mikedizon

    @thymikee thanks, i removed react-native-cli from my global packages.

    running react-native commands now returns command not found, so I ran npx react-native config from the mobile directory. The only package returned was react-native-vector-icons.

    {
      "root": "/path/to/project/directory/packages/mobile",
      "reactNativePath": "/path/to/project/directory/node_modules/react-native",
      "dependencies": {
        "react-native-vector-icons": {
          "root": "/path/to/project/directory/node_modules/react-native-vector-icons",
          "name": "react-native-vector-icons",
          "platforms": {},
          "assets": [
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/AntDesign.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/Feather.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/Fontisto.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/Foundation.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/Ionicons.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
            "/path/to/project/directory/node_modules/react-native-vector-icons/Fonts/Zocial.ttf"
          ],
          "hooks": {},
          "params": []
        }
      },
      "commands": [],
      "assets": [],
      "platforms": {},
      "haste": {
        "providesModuleNodeModules": [],
        "platforms": []
      },
      "project": {}
    }
    
    
    

    Running yarn workspace mobile react-native config returns

    {
      "root": "/path/to/project/directory/packages/mobile",
      "reactNativePath": "/path/to/project/directory/node_modules/react-native",
      "dependencies": {},
      "commands": [],
      "assets": [],
      "platforms": {},
      "haste": {
        "providesModuleNodeModules": [],
        "platforms": []
      },
      "project": {}
    }
    
    

    the contents of my react-native.config are

    module.exports = {
      project: {
        ios: {},
        android: {},
      },
      assets: ['fonts'],
    };
  17. thymikee commented on Feb 19, 2020

    @thymikee
    Member

    Do you have a package.json in packages/mobile? Where are package.jsons and what native packages are inside? With a reproduction we could avoid these questions, just saying.

  18. ahmaddehnavi commented on Jul 30, 2020

    @ahmaddehnavi

    I had upgraded from 61.5 to 63.1 and my problem solved when removing path param from use_react_native! in podfile
    something like this:
    config = use_native_modules!
    use_react_native!

  19. Daniel-Griffiths commented on Aug 14, 2020

    @Daniel-Griffiths

    Thanks @ahmaddehnavi that worked for me 😄

  20. sulagarde commented on Nov 10, 2020

    @sulagarde

    Hi! I just upgrading RN from 0.60.6 to 0.61.5 and I get the same error code (cli version => 3.2.1, cli-platform-ios => 3.2.1, cli-platform-android => 3.1.4 ).

    I use yarn workspace this way:

    • root folder package.json doesn't contain any dependencies but worskspaces declaration
    • ./core folder contain the code shared with web (no native code)
    • ./src/appli/common contain the code shared for different apps with package.json containing those native dependencies:
      "react": "16.9.0",
      "react-native": "0.61.5",
      "@react-native-community/async-storage": "1.12.1",
      "@react-native-community/clipboard": "1.4.0",
      "@react-native-community/cameraroll": "~1.6.x",
      "@react-native-community/viewpager": "3.0.0",
      "@react-native-community/netinfo": "5.6.2",
      "@react-native-community/push-notification-ios": "1.7.1",
      "@react-native-firebase/app": "8.4.7",
      "@react-native-firebase/crashlytics": "8.4.12",
      "@react-native-firebase/dynamic-links": "7.5.11",
      "@react-native-firebase/messaging": "7.9.2",
      "@react-native-firebase/perf": "7.4.10",
      "react-native-app-auth": "5.x",
      "react-native-android-badge": "^0.5.0",
      "react-native-camera": "3.40.0",
      "react-native-config": "0.12.0",
      "react-native-check-app-install": "0.0.5",
      "react-native-exit-app": "1.1.0",
      "react-native-file-viewer": "2.1.3",
      "react-native-image-crop-picker": "0.25.3",
      "react-native-inappbrowser-reborn": "3.4.0",
      "react-native-jitsi-meet": "2.1.1",
      "react-native-gesture-handler": "1.4.0",
      "react-native-linear-gradient": "2.5.6",
      "react-native-localize": "1.1.4",
      "react-native-reanimated": "1.8.0",
      "react-native-screens": "1.0.0-alpha.23",
      "react-native-splash-screen": "3.2.0",
      "react-native-svg": "9.5.3",
      "react-native-thumbnail": "https://github.com/phuochau/react-native-thumbnail.git",
      "react-native-vector-icons": "6.6.0",
      "react-native-version-check": "3.1.0",
      "react-native-view-overflow": "0.0.4",
      "react-native-webview": "7.0.1",
      "react-native-youtube-sdk": "1.0.12",
      "rn-fetch-blob": "0.12.0"

    When I run npx react-natif config from root folder (with no dependencies) the result is something like this =>
    {
    "root": "/path/to/project/directory/packages/mobile",
    "reactNativePath": "/path/to/project/directory/node_modules/react-native",
    "dependencies": {},
    "commands": [],
    "assets": [],
    "platforms": {},
    "haste": {
    "providesModuleNodeModules": [],
    "platforms": []
    },
    "project": {}
    }

    If I run in the command in src/appli/common, all dependencies are listed.

    Is there something I am doing wrong?

  21. octopicorn commented on Jan 5, 2021

    @octopicorn

    @sulagarde I think if you are using workspaces, and your project is nested, you can just pass in a custom relative path to the use_react_native! method. My /node_modules/react-native is at the root directory, but my app's Podfile is down under /packages/myproject/ios so I use this in my Podfile:

      config = use_native_modules!
    
      use_react_native!(:path => "../../../node_modules/react-native")
    

    all i did was pass in a custom path, and added some extra ../ as needed to make it correct

  22. chetstone commented on Dec 13, 2021

    @chetstone

    I had a dummy package.json in my iOS folder. Removing it fixed this problem. Yay!
    I had put it in there to work around a problem building iOS back in RN32

  23. ZainabShakeel commented on Jan 30, 2022

    @ZainabShakeel

    few files in iOS folder was deleted so beacuse of this i was facing this issues
    restore those files fix my problem

  24. LoserAntbear commented on Apr 17, 2022

    @LoserAntbear

    Same thing happened for me when I tried to list dependencies as peer-ones.
    So I had to move them back to regular "dependencies".

    But I'm developing an internal package for RN projects, I still need these dependencies to be listed as peer-ones. Any advice on that, please?

  25. gabrieldonadel commented on Nov 8, 2023

    @gabrieldonadel
    Member

    If you're encountering this just delete node_modules and install again, in my case "project": {} was empty

  26. nithinyell commented on Dec 14, 2023

    @nithinyell

    Some times you may also need to check the Command line tool was set correctly in xcode
    Screenshot 2023-12-14 at 3 15 40 PM

  27. LorandP commented on Apr 3, 2024

    @LorandP

    @nithinyell Thank you! I had the same issue and found it with your help

  28. longmao commented on May 9, 2024

    @longmao

    Some time you may also need to check the Command like tool was set correctly in xcode Screenshot 2023-12-14 at 3 15 40 PM

    so cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions