0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

React Nativeバージョンアップ作業 (v0.60.5 -> v0.62.2)

Last updated at Posted at 2020-06-03

モジュールのリファクタリングの影響?などがあり、Podfile周りにエラーが出たので追加・修正を行いました。大きな変更は必要なくてよかったよかった。以下は発生したエラー群です。

[!] No podspec found for `React-Core` in `../node_modules/react-native/React`
[!] No podspec found for `React-DevSupport` in `../node_modules/react-native/React`
[!] No podspec found for `React-RCTWebSocket` in `../node_modules/react-native/Libraries/WebSocket`
[!] Unable to find a specification for `FBReactNativeSpec (= 0.62.2)` depended upon by `React-RCTVibration`
[!] Unable to find a specification for `React-RCTVibration (= 0.62.2)` depended upon by `React`
[!] Unable to find a specification for `FBReactNativeSpec (= 0.62.2)` depended upon by `React-RCTVibration`
[!] Unable to find a specification for `ReactCommon/turbomodule/core (= 0.62.2)` depended upon by `React-RCTVibration`
[!] The name of the given podspec `Yoga` doesn't match the expected one `yoga`
[!] CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":

修正した行。

pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

修正後の行。

pod 'React-Core', :path => '../node_modules/react-native'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native'
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

新しく追加した行。

pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"

参考にしたのは以下のページ。

https://github.com/facebook/react-native/issues/26505
https://github.com/facebook/react-native/issues/26753
https://github.com/facebook/react-native/issues/25553
https://stackoverflow.com/questions/61290827/pod-install-error-the-name-of-the-given-podspec-yoga-doesnt-match-the-expect
https://stackoverflow.com/questions/56917963/react-native-ios-podfile-issue-with-use-native-modules
https://stackoverflow.com/questions/60888440/react-rctdevsettings-h-file-not-found
https://stackoverflow.com/questions/60880105/cocoapods-could-not-find-compatible-versions-for-pod-reactcommon-jscallinvoker

あと、React Navigationがv5になっていましたが、だいぶ変更が大きいみたいなのでそっと置いておくことにしました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?