Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an error on pod installing on React native 0.75.2 #686

Closed
1 task done
Sbdobariya opened this issue Jan 11, 2025 · 1 comment
Closed
1 task done

Getting an error on pod installing on React native 0.75.2 #686

Sbdobariya opened this issue Jan 11, 2025 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@Sbdobariya
Copy link

Sbdobariya commented Jan 11, 2025

What happened?

[!] Invalid Podfile file: [!] /opt/homebrew/bin/node ./../node_modules/react-native/scripts/generate-codegen-artifacts.js -p /Users/smitdobariya/Documents/easy_split/ios/.. -o /Users/smitdobariya/Documents/easy_split/ios -t ios

[Codegen] Analyzing /Users/smitdobariya/Documents/easy_split/package.json
[Codegen] Searching for codegen-enabled libraries in the app.
[Codegen] The "codegenConfig" field is not defined in package.json. Assuming there is nothing to generate at the app level.
[Codegen] Searching for codegen-enabled libraries in the project dependencies.
[Codegen] Found @react-native-async-storage/async-storage
[Codegen] Found @react-native-google-signin/google-signin
[Codegen] Found lottie-react-native
[Codegen] Found react-native
[Codegen] Found react-native-google-mobile-ads
[Codegen] Found react-native-pager-view
[Codegen] Found react-native-permissions
[Codegen] Found react-native-reanimated
[Codegen] Found react-native-safe-area-context
[Codegen] Found react-native-screens

[Codegen] >>>>> Searching for codegen-enabled libraries in react-native.config.js
[Codegen] Processing rnasyncstorage
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos, visionos for rnasyncstorage
[Codegen] Processing RNGoogleSignInCGen
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for RNGoogleSignInCGen
[Codegen] Processing lottiereactnative
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios, macos, tvos for lottiereactnative
[Codegen] Processing FBReactNativeSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing rncore
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Processing RNGoogleMobileAdsSpec
[Codegen] Searching for podspec in the project dependencies.
[Codegen] Supported Apple platforms: ios for RNGoogleMobileAdsSpec
[Codegen] Done.
UnsupportedModulePropertyParserError: Module NativeGoogleMobileAdsNativeModule: TypeScript interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's or non nullable 'EventEmitter's. Property 'onAdEvent' refers to a 'TSTypeReference'.
at throwIfModuleTypeIsUnsupported (/Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/error-utils.js:205:11)
at buildPropertySchema (/Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:523:3)
at /Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:856:22
at guard (/Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/utils.js:31:14)
at /Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:836:14
at Array.map ()
at buildModuleSchema (/Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:818:6)
at /Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:633:9
at guard (/Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/utils.js:31:14)
at buildSchemaFromConfigType (/Users/smitdobariya/Documents/easy_split/node_modules/@react-native/codegen/lib/parsers/parsers-commons.js:632:22) {
nodes: [ undefined ]
}
.

from /Users/smitdobariya/Documents/easy_split/ios/Podfile:28

-------------------------------------------

use_react_native!(

:path => config[:reactNativePath],

-------------------------------------------

Platforms

Android, but have not tested behavior on iOS

React Native Info

System:
  OS: macOS 15.2
  CPU: (8) arm64 Apple M1
  Memory: 336.56 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.9.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.3
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2024.09.23.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/smitdobariya/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.19072.14.2412.12360217
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 3.1.2
    path: /Users/smitdobariya/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.2
    wanted: 0.75.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Are your using Typescript?

  • My project is using Typescript

package.json

{
  "name": "demo",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@invertase/react-native-apple-authentication": "^2.4.0",
    "@react-native-async-storage/async-storage": "^2.0.0",
    "@react-native-firebase/app": "^20.4.0",
    "@react-native-firebase/auth": "^20.4.0",
    "@react-native-firebase/firestore": "^20.5.0",
    "@react-native-firebase/storage": "^20.5.0",
    "@react-native-google-signin/google-signin": "^13.0.1",
    "@react-navigation/bottom-tabs": "^6.6.1",
    "@react-navigation/native": "^6.1.18",
    "@react-navigation/native-stack": "^6.11.0",
    "@reduxjs/toolkit": "^2.2.7",
    "libphonenumber-js": "^1.11.9",
    "lottie-react-native": "^6.7.2",
    "patch-package": "^8.0.0",
    "react": "18.3.1",
    "react-native": "0.75.2",
    "react-native-contacts": "^7.0.8",
    "react-native-device-country": "^1.0.4",
    "react-native-element-dropdown": "^2.12.1",
    "react-native-fast-image": "^8.6.3",
    "react-native-flash-message": "^0.4.2",
    "react-native-google-mobile-ads": "^14.8.0",
    "react-native-image-crop-picker": "^0.41.2",
    "react-native-modal": "^13.0.1",
    "react-native-modal-popover": "^2.1.3",
    "react-native-pager-view": "^6.5.1",
    "react-native-permissions": "^4.1.5",
    "react-native-phone-number-input": "^2.1.0",
    "react-native-reanimated": "^3.15.1",
    "react-native-responsive-fontsize": "^0.5.1",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "^4.10.9",
    "react-native-screens": "^3.34.0",
    "react-native-splash-screen": "^3.3.0",
    "react-native-tab-view": "^4.0.3",
    "react-redux": "^9.1.2"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/babel-preset": "0.75.2",
    "@react-native/eslint-config": "0.75.2",
    "@react-native/metro-config": "0.75.2",
    "@react-native/typescript-config": "0.75.2",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.3.1",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}

app.json

{
  "name": "demo",
  "displayName": "demo",
  "react-native-google-mobile-ads": {
    "ios_app_id": "ca-app-pub-**************"
  }
}

ios/Podfile

def node_require(script)
  # Resolve script with node to allow for hoisting
  require Pod::Executable.execute_command('node', ['-p',
    "require.resolve(
      '#{script}',
      {paths: [process.argv[1]]},
    )", __dir__]).strip
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
prepare_react_native_project!

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'demo' do
  config = use_native_modules!

  use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true
  $RNGoogleMobileAdsAsStaticFramework = true
  
  use_react_native!(
    :path => config[:reactNativePath],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'demoTests' do
    inherit! :complete
    # Pods for testing
  end

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.name == 'BoringSSL-GRPC'
        target.source_build_phase.files.each do |file|
          if file.settings && file.settings['COMPILER_FLAGS']
            flags = file.settings['COMPILER_FLAGS'].split
            flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
            file.settings['COMPILER_FLAGS'] = flags.join(' ')
          end
        end
      end
    end
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false,
      # :ccache_enabled => true
    )
  end
end

android/build.gradle

android/app/build.gradle

android/settings.gradle

AndroidManifest.xml

@Sbdobariya Sbdobariya added the help wanted Extra attention is needed label Jan 11, 2025
@mikehardy
Copy link
Collaborator

Please search issues or at least check for pinned issues prior to opening a new issue -- duplicate #678

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants