iOS Build Fail After upgrading from 0.57.8 to 0.58.1
See original GitHub issueEnvironment
React Native Environment Info:
System:
OS: macOS 10.14.2
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 138.55 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.1.0 - /usr/local/bin/node
npm: 6.6.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: ^0.58.1 => 0.58.1
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-rename: 2.4.0
Description
I started project with version v0.57.8 I followed instruction here for upgrading to v0.58.1: https://facebook.github.io/react-native/docs/upgrading#upgrade-based-on-git After upgrading, Android app wasn’t responding to touches but after deleting and re-installing node_modules, plus --reset-cache it’s solved.
But on iOS build i still get this error(both on run-ios and Xcode):
PBXCp /.../RNApp/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h /.../RNApp/ios/build/Build/Products/Debug-iphonesimulator/include/privatedata/PrivateDataBase.h (in target: privatedata)
cd /.../RNApp/node_modules/react-native/React
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /.../RNApp/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h /.../RNApp/ios/build/Build/Products/Debug-iphonesimulator/include/privatedata
error: /.../RNApp/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h: No such file or directory
** BUILD FAILED **
The following build commands failed:
PBXCp /.../RNApp/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h /.../RNApp/ios/build/Build/Products/Debug-iphonesimulator/include/privatedata/PrivateDataBase.h
(1 failure)
Reproducible Demo
$ react-native init --version 0.57.8 Dummy
$ react-native-git-upgrade
$ git apply $TMPDIR/react-native-git-upgrade/upgrade_0.57.8_0.58.1.patch
$ rm -rf node_modules && npm install
$ react-native run-ios -- --reset-cache
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:17
Top Results From Across the Web
Xcode Archive build failed with react native project
Just updating the version of react-native is not enough when it comes to upgrading a react-native application. There are other changes to ...
Read more >How to Upgrade from React Native 0.57 to 0.59 | Part 1
Be aware that you may need to clean your XCode caches after this change. Here's an article that can help with that. Step...
Read more >How to fix the error "The developer of this app needs to update ...
Step 2 : Build App after adding the flag --generate-entitlement-der under the Build Settings >> Other Code Sign Flags in Xcode against each...
Read more >Xamarin.iOS build error after upgrade, The ...
After upgrade both Visual Studio on Windows and XCode on Mac to latest version. I am no longer able to build my Xamarin...
Read more >Unable to prepare iPhone for devel… | Apple Developer Forums
I upgraded Xcode to 13.2.1 and problem solved. ... Here IOS 15.4, Xcode 13.2.1 and I still get this error over and over...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I think i found the solution. When i searched for files those include “PrivateDataBase.h” they all were under the /RNApp/ios/build folder. I think they are precompiled files for faster further builds and i guess they are safe to delete because build/ folder included in .gitignore file provided by react native.
Solution: Clear under /RNApp/ios/build/ folder and re-run
react-native run-ios -- --reset-cache
I was having the same error
/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h: No such file or directory
and this is how I fixed it.Hope this helps