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
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)
$ 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
Before upgrade to 0.58.1 (My RN: 0.57.7)
react-native eject
react-native-git-upgrade
react-native link
After linked
react-native run-ios
I can run perfect now, in /ReactCommon/ folder still missing /privatedata/. 馃槩
馃憢 there
we are currently trying to improve on the upgrading experience because the tool that you used (and linked in the docs) is sort-of been unmaintained for a while.
I know it's not ideal and we are working on this 馃挭 Can you, in the meantime, try to do the same procedure but instead using this repo as source for the diff (the git apply step)? https://github.com/pvinis/rn-diff-purge
Getting this error as well...
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
Thank you, just solved it for me as well :)
Ok, ty @GoktuqCan for the solution - closing.
I am also having this issue after react-native-git-upgrade; the steps above did not work for a RELEASE archive, but they do for a DEBUG archive, fwiw (different schemes in Xcode). I suspect the problem could be therein (perhaps some Xcode tomfoolery that was not resolved correctly by the upgrade command line tool).
Here are my "cleaning" steps (which did not fix the problem):
watchman watch-del-all
rm -rf $TMPDIR/react-*
rm -rf $TMPDIR/metro-*
rm -rf $TMPDIR/haste-*
rm -rf node_modules/
npm cache clean --force
rm -rf ios/Pods
rm -rf ios/build
rm -rf android/build
npm install
pod install
npm start -- --reset-cache
I am reverting back to 0.57.8 for now. I'll try to get back on 0.58.x at some point using a different upgrade path!
Hi @toblerpwn i didn't use the react-native-git-upgrade used rn-diff-purge instead. If you upgrading from 0.57.8 here is link to compare: 0.57.8-to-0.58.3
Difference not that much you could make changes yourself less than 10 minutes. After that:
$ rm -rf node_modules && npm install
$ react-native run-ios -- --reset-cache
Hope this helps you.
@GoktuqCan I re-upgraded using rn-diff-purge, and yet I encountered the same problem!
I think the missing step for me was to actually open Xcode and clean the build folder using the Xcode menu (although I used cmd-option-K and cmd-K both). I got this idea by reading this comment on a related issue: https://github.com/facebook/react-native/issues/23183#issuecomment-458071519

I did also actually run the build from Xcode, too (prior to this I was only building RELEASE using fastlane). Perhaps simply running a release build from within Xcode un-cached something, too!
For anyone who's still searching for a solution after trying all those above.
I resolved doing this:
cd node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh
If remove the folder ios/build that include some settings in info.plist sometimes.
So just remove the folder Build (the path is ios/build/Build)
then react-native run-ios will fix the problem.
That's what I try. Hope it can helps others
I'm getting this same error building with Xcode and running react-native 0.57.8
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
I was having the same error
/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h: No such file or directoryand this is how I fixed it.
- In the top menu, open 'Product' and click 'Clean Build Folder'.
- Open Xcode 'Preferences' and navigate to the 'Locations' tab on the top right.
- Under the 'Derived Data' input, there is a path in grey text and an arrow icon next to it. Click the arrow icon.
- This will take you to your DerivedData folder in finder.
- With this folder open, Quit Xcode completely.
- Back in finder, delete all the contents INSIDE the 'DerivedData' folder. Do not delete the folder itself.
- Re-open Xcode and try rebuilding your app.
Hope this helps
It works for me. Thanks!
I was having the same error
/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h: No such file or directoryand this is how I fixed it.1. In the top menu, open 'Product' and click 'Clean Build Folder'. 2. Open Xcode 'Preferences' and navigate to the 'Locations' tab on the top right. 3. Under the 'Derived Data' input, there is a path in grey text and an arrow icon next to it. Click the arrow icon. 4. This will take you to your DerivedData folder in finder. 5. With this folder open, Quit Xcode completely. 6. Back in finder, delete all the contents INSIDE the 'DerivedData' folder. Do not delete the folder itself. 7. Re-open Xcode and try rebuilding your app.Hope this helps
I upgraded from 0.57.8 to 0.58.0, these steps allow me to build from Xcode, but still cannot build from the command line
I was having issues in iOS after upgrading from 0.56 to 0.59.5~. I was getting different errors between the CLI and Xcode 10, which eventually pointed towards JavaScriptCore (JSC) (which makes sense given 0.59 and JSC breaking changes). My "final boss" on the upgrade problem-set that de-clogged the iOS system is described via the following set of steps I wrote here:
I was able to fix it by blowing out the ios/build folder, deleting Podfile.lock (with specific problem with Folly (and loosely related was glog but there were some red herring debug pathways there), upgrading cocoapods seemed to fix the problem caused by React Native trying to rely on stale packages where syntax was probably different, or where JSC-critical API was missing.
After that, I now boil it down to some caching/lock problem stemming from breaking changes in RN 0.57 to -0.59 caused by React Native baking in JSC. If you are having issues upgrading to around RN 0.59, you will most likely find that you need to remove android/build and ios/build folders and focus a bit on refreshing every part of the build system that might be relying on old files.
Here is a rough checklist to get your mind flowing:
npm start -- --reset-cache0.56 to 0.57 or 0.58 because my Android/gradle stuff changed a lot and broke my release builds via cd android && ./gradlew assembleRelease0.58 to 0.59 and especially for me because I am using react-native-maps which generated all kinds of issues as JSC config files were changed to support 64bit CPU architectures and RN 0.59; some third party dependencies seemed to really have an issue with that if their versions were locked in and stale because they weren't supporting JSC.If you discover your issues sound similar to mine and you learned about anything I didn't describe, feel free to include a comment and describe a bit about how it relates to JSC and what you did to fix it. This will help others in the future that find this thread while Googling.
react-native-git-upgrade
Share
Before upgrade to 0.58.1 (My RN: 0.57.7)
- Backup your /ios/ or rename to /ios_old/ (as you like)
react-native eject
react-native-git-upgrade
react-native linkAfter linked
- Compare all *.plist between /ios/ and /ios_old/ and cover the new one
react-native run-ios
- Done
I can run perfect now, in /ReactCommon/ folder still missing /privatedata/. 馃槩
worked perfectly Thanksss!!! <3
Most helpful comment
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