react-native: 'React/RCTComponentViewProtocol.h' file not found on Upgrade to v0.69.5
New Version
0.69.5
Old Version
0.67.4
Build Target(s)
iOS Simulator in debug mode
Output of react-native info
System: OS: macOS 12.4 CPU: (8) arm64 Apple M1 Memory: 479.03 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.0/bin/yarn npm: 8.1.4 - ~/.nvm/versions/node/v16.13.0/bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7784292 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 12.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.5 => 0.69.5 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Issue and Reproduction Steps
- npx react-native upgrade
- Resolve conflicts
- Verify the upgrade from RN upgrade helper
- Add the missing changes
- yarn install
- cd ios
- Remove Pods folder
- Remove Podfile.lock file
- pod install
- Clear Build from XCode
- Build App
The XCode build process stops and reports that 'React/RCTComponentViewProtocol.h' file not found
in file Pods/Development Pods/React-Codegen/RCTThirdPartyFabricComponentsProvider.h
on line #import <React/RCTComponentViewProtocol.h>
.
PS: This didn’t happen and the build passed successfully if initiated a clean RN project using npx react-native init samplern --version 0.69.5
.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 16
Warning: all untracked files of your repo will be deleted
I gitclean’d my workspace:
and it worked 💥 🤯
I had the same issue when upgrading to RN 0.73.3.
Clean your project, delete yarn.lock and ios build folder. Run yarn and pod install. This should fix it. This has nothing to do with git, so do not attempt to do weird stuff with git, you will lose your files.
Please be really careful running this. I lost all untracked files in my repo 😦
@ste7en could you please add to your comment something like “Warning: all untracked files of your repo will be deleted”.
It worked for me thanks, but I lost some of my files, which I had to recover from time machine