react-native-community / upgrade-support

A central community-backed place to request and give help when upgrading your app.
MIT License
256 stars 2 forks source link

Upgrade 0.62.2 ==> 0.63.2: fatal error: 'UMReactNativeAdapter/UMModuleRegistryAdapter.h' file not found #106

Open ghasemikasra39 opened 4 years ago

ghasemikasra39 commented 4 years ago

Environment

info Fetching system and libraries information...
System:
    OS: macOS 10.15.3
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 136.74 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: 1.22.4 - ~/Documents/youpendo-app-bareworkflow/node_modules/.bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6392135
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_232 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: ^4.8.0 => 4.10.0
    react: ^16.13.1 => 16.13.1
    react-native: ^0.63.2 => 0.63.2
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Upgrading version

Upgrade from 0.62.2 to 0.63.2

Description

My RN project was running on 0.62.2 without any issues. I have upgraded to 0.63.2 and now I am getting this error:

In file included from /Users/user/Documents/my-app-/ios/MyApp/main.m:10:
/Users/user/Documents/my-app-/ios/MyApp/AppDelegate.h:9:9: fatal error: 'UMReactNativeAdapter/UMModuleRegistryAdapter.h' file not found
#import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Remarks

  1. Our project was built using expo managed workflow, then after a few months, we ejected out of expo, upgraded to 0.62.2, and have developed in bare workflow.
  2. I checked this and saw that our project is a bit different even on 0.62.2! Maybe because it was an expo managed workflow before.
  3. When running npx react-native upgrade, I got this output:
    info No version passed. Fetching latest...
    info Fetching diff between v0.62.2 and v0.63.2...
    info Applying diff...
    warn Excluding files that exist in the template, but not in your project:
    - .flowconfig
    - ios/MyApp-tvOSTests/Info.plist
    error Excluding files that failed to apply the diff:
    - android/app/build.gradle
    - android/build.gradle
    - android/gradle.properties
    - android/gradle/wrapper/gradle-wrapper.jar
    - android/gradle/wrapper/gradle-wrapper.properties
    - android/gradlew.bat
    - ios/Podfile
    - ios/MyApp/AppDelegate.m
    - ios/MyApp/Base.lproj/LaunchScreen.xib
    Please make sure to check the actual changes after the upgrade command is finished.
    You can find them in our Upgrade Helper web app: https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.2
    error Automatically applying diff failed. We did our best to automatically upgrade as many files as possible
    warn Continuing after failure. Some of the files are upgraded but you will need to deal with conflicts manually
  4. If you need more info, feel free to ask and I will share the content of other files here.

    Reproducible demo

  1. npx react-native upgrade
  2. rm -rf podfile.lock
  3. Remove the content of Podfile and replace it with:
    
    require_relative '../node_modules/react-native/scripts/react_native_pods'
    require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'MyApp' do config = use_native_modules!

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

use_flipper! post_install do |installer| flipper_post_install(installer) end end


4. `yarn install && cd ios && pod install && cd .. && npx react-native  run-ios`
impl-kano commented 4 years ago

I've got the same error... My project was on 0.61.5 and have been ejected from expo.

ghasemikasra39 commented 4 years ago

Dear @impl-kano I have created a brand new expo project with sdk 39 and react native version 0.63.3 and ejected afterwards. I am trying to compare this result to my own project and do the upgrade manually.

juzerdhinoj commented 4 years ago

I am facing the same issue after updating from v0.62.2 to v0.63.3, my application is ejected from expo if someone figured out how to fix this issue please help out.

ghasemikasra39 commented 4 years ago

@juzerdhinoj I fixed it by the manual upgrade. It took three days to make it to work. Using Expo is the biggest mistake a developer can make when starting a React Native project. I still don't understand why companies nowadays decide to start with Expo and then all of them regret after a few months and want to eject out of Expo.

lucifer2355 commented 3 years ago

@ghasemikasra39 I have the same error. and also my application is ejected from the expo. my react-native version is 0.63.3. how to fix the issue please help out.

diegodiaz commented 3 years ago

I have the same error, my react-native version is 0.63.3

Siddharth2212 commented 3 years ago

Hi i am facing same issue. iId anyone find solution?

strillo commented 3 years ago

Same problem on 0.63.4 (brand new app, no Expo).. Is there any update on this? I've tried reinstalling all node modules, pods etc but still getting the same error, both simulator & device.

ghasemikasra39 commented 3 years ago

Dear @strillo The only solution that I can suggest is to create a brand new expo project with the latest sdk and the latest version of react native. Then eject afterward. Now you must compare this clean project with your own project and do all the modifications by hand. I can imagine how frustrating this would be.

shyankashani commented 3 years ago

☝️ Could this truly be the only way?