In my react-native project (react-native@0.60) in the ios/ dir I run pod install
and get this error:
[!] Invalid `Podfile` file: no implicit con
maybe its related to rights issues
adding "@react-native-community/cli-platform-ios": "3.0.0" in package.json
and
sudo chown -R user .
worked for me
Getting rid of the line use_native_modules!
works as well. Maybe this has been deprecated or syntax has changed? Curious to hear from others.
Update: Seems to be an issue with react-native 0.60.0. Until a release fixes this bug, 0.59.10 can be explicitly installed, and you only need to add CocoaPods as necessary.
react-native init APP_NAME --version react-native@0.59.10
Does anyone have a consistently recreatable solution for this issue that does not revolve around getting rid of use_native_modules? I have looked into:
And I am unable to fix the issue. It appears to be some npm dependency, but others on my team are not seeing it.
i just dropped the whole node_modules and RN cache folder and did a clean reinstall, this fixed the "use_native_modules" problem so far....but after that i had to hassle a lot with other libs which where just not RN0.60 ready ;)
This started happening out of the blue today, and the problem was a space in my directory structure. Ex:
/path/to/Directory\ Name/RNProject throws the !native_modules error /path/to/DirectoryName/RNProject works as it should
Pods was looking for "Directory. "
After removing several react-native npm packages (ie: react-native-bluetooth-serial, react-native-sound, and more...) pod install
works.
It appears the pod install error is related to older react-native packages that don't support cocoa pods? I'm not sure the details but removing those packages from node_modules & package.json solved my issue.