IOS:无效的“Podfile”文件:没有将 nil 隐式转换为 String

Don*_*ode 15 ios npm react-native npx pod-install

我刚刚开始学习react-native。在尝试运行时npx pod-install我得到:

\n
Scanning for pods...\n1.11.3\n> pod install\nAuto-linking React Native modules for target `AudioOnlyRN`: RNCAsyncStorage, RNCClipboard, react-native-background-timer, react-native-daily-js, and react-native-webrtc\n[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json\n\n[!] Invalid `Podfile` file: no implicit conversion of nil into String.\n\n #  from /.../react-native/ios/Podfile:9\n #  -------------------------------------------\n #\n >    use_react_native!(:path => config["reactNativePath"])\n #\n #  -------------------------------------------\nCouldn't install Pods. Updating the Pods project and trying again...\n> pod install --repo-update\nAuto-linking React Native modules for target `AudioOnlyRN`: RNCAsyncStorage, RNCClipboard, react-native-background-timer, react-native-daily-js, and react-native-webrtc\n[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json\n\n[!] Invalid `Podfile` file: no implicit conversion of nil into String.\n\n #  from /.../react-native/ios/Podfile:9\n #  -------------------------------------------\n #\n >    use_react_native!(:path => config["reactNativePath"])\n #\n #  -------------------------------------------\nCouldn't install Pods. Updating the Pods project and trying again...\nCommand `pod install` failed.\n\xe2\x94\x94\xe2\x94\x80 Cause: Invalid `Podfile` file: no implicit conversion of nil into String.\n\n #  from /.../react-native/ios/Podfile:9\n #  -------------------------------------------\n #\n >    use_react_native!(:path => config["reactNativePath"])\n #\n #  -------------------------------------------\n
Run Code Online (Sandbox Code Playgroud)\n

知道我这里发生了什么不匹配吗?

\n

我不确定我是否理解 node_modules/package.json 和 Podfile 之间关系的层次结构。

\n

use*_*123 57

尝试改变

use_react_native!(:path => config["reactNativePath"])
                                  ^               ^
Run Code Online (Sandbox Code Playgroud)

use_react_native!(:path => config[:reactNativePath])
                                  ^
Run Code Online (Sandbox Code Playgroud)