在`.node_modulesReact`中没有找到`React-Core`的podspec。

首先它不重复。因为我有不同的问题。我升级了我的react Native版本到’0.62.2’(我希望我没有升级)。我现在正在处理很多问题,这是我现在的问题。React-Core../node_modules/React 而我却解不开

可见,在类似的问题中,总是有错误的路径。但是虽然我写了正确的路径,但还是给出了一个错误。另外当我看’.node_modulesreact-native’时,我在这里看不到React-Core文件[![在这里输入图片描述][1]][1]我也发现了类似的问题和解决方法.如下面的例子。

  1. 在`.node_modulesreact-nativeReact`中没有找到`React-Core`的podspec。

  2. 在`.node_modulesreact-native`中没有找到`React-Core`的podspec。

荚安装

分析依赖性

获取podspec DoubleConversion../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec

[!]没有找到podspec React-Core../node_modules/React

Podfile

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

target 'DGFonder' do
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  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'
  p
end

swift4 = ['Charts']

post_install do |installer|
  installer.pods_project.targets.each do |target|

    targets_to_ignore = %w(React yoga)
      
    if targets_to_ignore.include? target.name
      target.remove_from_project
    end

    target.build_configurations.each do |config|
      if swift4.include?(target.name)
        config.build_settings['SWIFT_VERSION'] = '4.1'
      end
    end
  end
end
```


  [1]: https://i.stack.imgur.com/NNLjD.png

解决方案:

React现在是node_modules中react-native的一部分。所以,你需要更新你的 React-Core 荚为。

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

通知 react-native 在指定的路径中。

本文来自投稿,不代表运维实战侠立场,如若转载,请注明出处:https://www.shizhanxia.com/883.html

(0)
上一篇 2022年6月29日 下午4:01
下一篇 2022年6月29日 下午4:01

相关推荐

发表评论

登录后才能评论