Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS: Invalid `Podfile` file: no implicit conversion of nil into String

I just started learning react-native. While trying to run npx pod-install I get:

Scanning for pods...
1.11.3
> pod install
Auto-linking React Native modules for target `AudioOnlyRN`: RNCAsyncStorage, RNCClipboard, react-native-background-timer, react-native-daily-js, and react-native-webrtc
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json

[!] Invalid `Podfile` file: no implicit conversion of nil into String.

 #  from /.../react-native/ios/Podfile:9
 #  -------------------------------------------
 #
 >    use_react_native!(:path => config["reactNativePath"])
 #
 #  -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
> pod install --repo-update
Auto-linking React Native modules for target `AudioOnlyRN`: RNCAsyncStorage, RNCClipboard, react-native-background-timer, react-native-daily-js, and react-native-webrtc
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json

[!] Invalid `Podfile` file: no implicit conversion of nil into String.

 #  from /.../react-native/ios/Podfile:9
 #  -------------------------------------------
 #
 >    use_react_native!(:path => config["reactNativePath"])
 #
 #  -------------------------------------------
Couldn't install Pods. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: no implicit conversion of nil into String.

 #  from /.../react-native/ios/Podfile:9
 #  -------------------------------------------
 #
 >    use_react_native!(:path => config["reactNativePath"])
 #
 #  -------------------------------------------

Any idea what mismatch do I have going on here?

I'm not sure I understand the hierarchy of the relationships between node_modules/package.json and Podfile.

like image 611
Don Code Avatar asked Dec 10 '25 10:12

Don Code


1 Answers

try changing

use_react_native!(:path => config["reactNativePath"])
                                  ^               ^

to

use_react_native!(:path => config[:reactNativePath])
                                  ^
like image 113
user966123 Avatar answered Dec 12 '25 00:12

user966123



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!