react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.41k stars 905 forks source link

Invalid Podfile: . #2551

Open stevenchen-info opened 1 week ago

stevenchen-info commented 1 week ago

Ask your Question

I'm trying to run pod install on my RN project. Last week all fine. Without any changes, after I install new Xcode version (15.4, previous 15.2). I encouter this error. When I run pod install, cmd line will stuck, didn't show any error message. When I cancel it. It show this error.

[!] Invalid `Podfile` file: .
 #  from /Users/steven/Projects/iam_monster_app/src/ios/Podfile:12
 #  -------------------------------------------
 #    # Pods for iam_monster_app
 >    config = use_native_modules!
 #  

I have tried

  1. Remove node_modules, Pod, Podfile.lock, clean cache
  2. try differen node version

Still not working. I have stuck for days. Please does anyone have any advice?

node: 18.20.4 react-natvei: 0.69.7 react-native-community: 7.0.0 ruby: 2.7.5 cocoapods: 1.16.2

dentemm commented 1 week ago

I have the exact same error, just updated to Xcode 16.0. I have a project on RN 0.76.1, and this error occurs when I add my custom Turbo Module to the project. When I remove it, all is fine. Before updating Xcode I had no issues with my custom package.

szymonrybczak commented 1 week ago

hey @dentemm, @stevenchen-info could you please run npx react-native config to ensure everything is linked correctly?

dentemm commented 1 week ago

@szymonrybczak Thanks for the suggestion, for me the issue was my custom Turbo Module was missing some information in package.json (which apparently wasn't required before?). After adding homepage, license and author I could install the pods again