question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS Build Fail After upgrading from 0.57.8 to 0.58.1

See original GitHub issue

Environment

  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:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:17

github_iconTop GitHub Comments

19reactions
GoktuqCancommented, Jan 28, 2019

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

11reactions
lvstrosscommented, Mar 7, 2019

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.

  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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found