9

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.

Don Code
  • 781
  • 3
  • 12
  • 25

1 Answers1

42

try changing

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

to

use_react_native!(:path => config[:reactNativePath])
                                  ^
benomatis
  • 5,536
  • 7
  • 36
  • 59
user966123
  • 631
  • 1
  • 9
  • 18