我用的是React Native.我在try 上传播客时遇到了这个问题.我已经成功安装了node_模块,但我遇到了这个问题.有什么问题吗?如果我们删除包锁.json和node_modules文件夹,我重新安装了npm.但我在安装pod 时遇到了这个问题.

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target '...' do

  # use_frameworks!

  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  # Required by RNFirebase
  pod 'Firebase/Core', '~> 6.8.1'

  # [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
  # pod 'Firebase/AdMob', '~> 6.8.1'
  pod 'Firebase/Auth', '~> 6.8.1'
  pod 'Firebase/Database', '~> 6.8.1'
  pod 'Firebase/Functions', '~> 6.8.1'
  pod 'Firebase/DynamicLinks', '~> 6.8.1'
  pod 'Firebase/Firestore', '~> 6.8.1'
  pod 'Firebase/Messaging', '~> 6.8.1'
  pod 'Firebase/RemoteConfig', '~> 6.8.1'
  pod 'Firebase/Storage', '~> 6.8.1'
  pod 'Firebase/Performance', '~> 6.8.1'
  pod 'Fabric', '~> 1.10.2'
  pod 'Crashlytics', '~> 3.14.0'


  target '..' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!

end

target '...-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for ..-tvOS

  target 'DeliveryApp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

推荐答案

Podspec从

../node_modules/react-native/React

../node_modules/react-native

所以请更新线路

pod 'React-Core', :path => '../node_modules/react-native/React'

pod 'React-Core', :path => '../node_modules/react-native'

Please check it here depend on your react-native version https://react-native-community.github.io/upgrade-helper/?from=0.60.6&到=0.61.4

React-native相关问答推荐

Reaction-原生NavBottom设计背景

React-Native:请纠正我对状态如何工作的误解 - 动态文本输入

使用动画标记时如何优化react 本机 map 性能

如何在 navigation.js 文件中的 react-navigation 中当前路由名称?

React Native TextInput 在android上打开时会自动关闭

从 React 原生 Js 代码调用 Android Native UI 组件方法

React Native - remount / reset / reload屏幕的最佳方式是什么?

如何在带有decorator 的 react-native 0.56 (Babel 7) 中使用 mobx

React Native StackNavigator 初始路由名称

redux-saga:如何以编程方式为yields 创建多个calls/side-effects?

如何在react-native android中打开应用程序设置页面?

如何启用 stacktrace react-native run-android 命令?

api.get(...).then(...).catch(...).finally 不是函数

从堆栈导航器中删除屏幕

ld:找不到-lFirebaseCore clang的库: error: linker command failed with exit code 1 (use -v to see invocation)

在配置 react-native-maps 中获取 "supportLibVersion" 、 "playServicesVersion" 和 "androidMapsUtilsVersion" 值

React Native Negative shadowOffset 创建顶部阴影

我可以从react-native元素中删除 tvOS 吗?

在 OPTIONS 响应后使 fetch API 与 CORS 一起工作

xcode 使用错误的 node.js 版本