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.

build failed: 'realm/util/assert.hpp' file not found

See original GitHub issue

Goals

I want to build project successfully

Expected Results

build success

Actual Results

build failed: ‘realm/util/assert.hpp’ file not found

image

Steps to Reproduce

npm install --save realm pod install build

Version of Realm and Tooling

  • Realm JS SDK Version: 3.4.2
  • Node or React Native: Node 10.17.0 , React Native 0.60.5
  • Client OS & Version: iOS
  • Which debugger for React Native: ?/None

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:32 (13 by maintainers)

github_iconTop GitHub Comments

9reactions
kraenhansencommented, Dec 13, 2019

Okay - I believe I’ve found the root cause now. The RealmJS Podspec has a prepare_command which downloads Realm Core (which contains the missing header). When the repository is cloned and pod install is never called locally, this command is never called and the headers will be missing.

A quick workaround for your project could be adding a postinstall script to your projects package.json, running node node_modules/realm/scripts/download-realm.js ios --sync:

{
  "name": "LejuBlock",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "postinstall": "node node_modules/realm/scripts/download-realm.js ios --sync"
  },
  // ...
}

UPDATE: We’ve fixed this in the latest version of Realm JS, so there should be no reason to add ☝️ that …

5reactions
kraenhansencommented, Dec 12, 2019

@tisfeng Realm JS v3.6.0 was just released with a fix for your original issue. I would highly appreciate if you tried removing the “postinstall” hack, upgrade Realm JS to the latest version and confirm the fix?

The same goes for anyone else that might have used the “postinstall” fix: @N3TC4T, @froliveira94, @chaeunlee, @protez, @keima (judging from your reactions)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lexical or Preprocessor issue: 'realm/keys.hpp' file not found
I got rid of the error by updating my pods. I ran pod update in the terminal after navigating to the project folder....
Read more >
XCode 10 - "new" file not found | Apple Developer Forums
I tried to compile my project which use both Objective-C and C++ files. One of the cpp files includes a header file (.h)...
Read more >
CLion fails to find some of my headers. Where does it search ...
cpp file is in the same folder as the header. But I'm not allowed to use "". How do I make CLion find...
Read more >
MFEM: general/error.hpp Source File
error.hpp ... 5 // This file is part of the MFEM library. For more information and ... 30 action when the build option...
Read more >
qt5-qtwebkit: fatal error: 'CSSGrammar.hpp' file not found
I tried it on two machines and I tried trace-mode. It didn't build. I am on El Capitan, thus depend on qt5. What...
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