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.

Could not build module 'React' from REAEventDispatcher.h #import <React/RCTEventDispatcher.h>

See original GitHub issue

Description

I was just enabling NEW_ARCH by USE_FABRIC=1 RCT_NEW_ARCH_ENABLED=1 pod install and getting these errors from Xcode

/project/ios/Pods/Headers/Public/hermes-engine/hermes/hermes.h:11:10: 'exception' file not found

/project/ios/Pods/Headers/Private/React-bridging/react/bridging/react/bridging/LongLivedObject.h:10:10: 'memory' file not found

/project/node_modules/react-native-reanimated/ios/REAEventDispatcher.h:2:9: Could not build module 'React'

image

Noted: when i click on jump to Defination for #import <React/RCTEventDispatcher.h> it is jumping correctly.

Steps to reproduce

  • Create Project with expo bare
  • add the same versions
  • goto ios directory and run this command USE_FABRIC=1 RCT_NEW_ARCH_ENABLED=1 pod install
  • try to build an app from Xcode. these errors will occur

you can try these versions

{
  "name": "project",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
    "pre-commit": "lint-staged --verbose",
    "prepare": "husky install",
    "postinstall": "patch-package"
  },
  "lint-staged": {
    "*.(js|jsx|ts|tsx)": [
      "pretty-quick --staged",
      "eslint \"**/*.{js,ts,tsx}\""
    ]
  },
  "dependencies": {
    "@apollo/client": "3.6.9",
    "@expo/react-native-action-sheet": "^3.13.0",
    "@gorhom/bottom-sheet": "^4.4.3",
    "@invertase/react-native-apple-authentication": "2.2.2",
    "@react-native-async-storage/async-storage": "1.17.7",
    "@react-native-clipboard/clipboard": "^1.10.0",
    "@react-native-community/geolocation": "2.1.0",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-firebase/analytics": "^15.2.0",
    "@react-native-firebase/app": "^15.2.0",
    "@react-native-firebase/app-check": "^15.2.0",
    "@react-native-firebase/auth": "^15.2.0",
    "@react-native-firebase/messaging": "^15.2.0",
    "@react-native-google-signin/google-signin": "^8.0.0",
    "@react-native-picker/picker": "2.4.2",
    "@react-navigation/bottom-tabs": "6.3.2",
    "@react-navigation/native": "6.0.11",
    "@react-navigation/native-stack": "6.7.0",
    "@rudderstack/rudder-integration-clevertap-react-native": "1.0.2",
    "@rudderstack/rudder-sdk-react-native": "1.4.1",
    "@shopify/flash-list": "^1.2.0",
    "add": "^2.0.6",
    "aia-react-native-idfa": "^5.0.1",
    "axios": "0.27.2",
    "clevertap-react-native": "^0.8.1",
    "deprecated-react-native-prop-types": "^2.3.0",
    "expo": "46.0.3",
    "expo-haptics": "11.3.0",
    "expo-jwt": "^1.4.1",
    "expo-localization": "13.1.0",
    "expo-secure-store": "11.3.0",
    "expo-web-browser": "11.0.0",
    "formik": "^2.2.9",
    "frames-react-native": "1.1.8",
    "graphql": "16.5.0",
    "i18n-js": "3.9.2",
    "immer": "9.0.15",
    "intl": "^1.2.5",
    "lottie-ios": "3.2.3",
    "lottie-react-native": "5.1.3",
    "moment": "2.29.4",
    "patch-package": "^6.4.7",
    "popmotion": "^11.0.3",
    "postinstall-postinstall": "^2.1.0",
    "qs": "6.11.0",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.4",
    "react-native-actionsheet": "^2.4.2",
    "react-native-adjust": "4.31.0",
    "react-native-animatable": "^1.3.3",
    "react-native-apay": "1.3.1",
    "react-native-appstate-hook": "^1.0.6",
    "react-native-blurhash": "1.1.10",
    "react-native-code-push": "^7.0.5",
    "react-native-codegen": "^0.71.0",
    "react-native-compressor": "^1.5.2",
    "react-native-confirmation-code-field": "^7.3.0",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-device-info": "^10.0.2",
    "react-native-elements": "^3.4.2",
    "react-native-event-listeners": "^1.0.7",
    "react-native-fast-image": "^8.5.11",
    "react-native-flash-message": "^0.2.1",
    "react-native-fs": "^2.20.0",
    "react-native-gesture-handler": "2.5.0",
    "react-native-google-places-autocomplete": "^2.4.1",
    "react-native-gradle-plugin": "^0.71.0",
    "react-native-image-picker": "^4.8.4",
    "react-native-in-app-review": "^4.1.1",
    "react-native-keyboard-accessory": "^0.1.16",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-keyboardawareview-spacer": "^0.0.2",
    "react-native-linear-gradient": "2.6.2",
    "react-native-lottie-splash-screen": "^1.0.1",
    "react-native-maps": "^1.1.0",
    "react-native-mmkv": "2.4.3",
    "react-native-modal": "^13.0.1",
    "react-native-normalize": "^1.0.1",
    "react-native-notifications": "4.3.1",
    "react-native-pager-view": "5.4.25",
    "react-native-portalize": "^1.0.7",
    "react-native-progress": "^5.0.0",
    "react-native-ratings": "^8.1.0",
    "react-native-reanimated": "3.0.0-rc.0",
    "react-native-reanimated-carousel": "3.0.3",
    "react-native-remix-icon": "^0.3.0",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-restart": "^0.0.24",
    "react-native-root-siblings": "^4.1.1",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "3.15.0",
    "react-native-shadow-2": "^6.0.6",
    "react-native-shimmer": "^0.6.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-stomp-websocket": "^1.0.8",
    "react-native-svg": "^12.4.3",
    "react-native-swipe-list-view": "^3.2.9",
    "react-native-tracking-transparency": "^0.1.1",
    "react-native-webview": "11.22.7",
    "react-redux": "8.0.2",
    "read-json-lines-sync": "2.2.2",
    "recoil": "0.7.4",
    "recyclerlistview": "4.1.1",
    "redux": "4.2.0",
    "redux-persist": "^6.0.0",
    "redux-saga": "^1.1.3",
    "reselect": "4.1.6",
    "rn-card-scanner": "^1.1.0",
    "rn-user-defaults": "^1.8.2",
    "tiny-emitter": "^2.1.0",
    "typesense": "1.3.0",
    "urijs": "1.19.11",
    "yarn": "^1.22.19",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.18.9",
    "@react-native-community/eslint-config": "^3.1.0",
    "@types/i18n-js": "^3.8.2",
    "@types/jest": "^26.0.23",
    "@types/qs": "^6.9.7",
    "@types/react-native": "^0.69.5",
    "@types/react-native-snap-carousel": "^3.8.5",
    "@types/react-test-renderer": "^17.0.1",
    "@typescript-eslint/eslint-plugin": "^5.7.0",
    "@typescript-eslint/parser": "^5.32.0",
    "appcenter-cli": "2.11.0",
    "babel-jest": "^28.1.3",
    "babel-preset-expo": "^9.2.0",
    "eslint": "^8.21.0",
    "eslint-config-universe": "^10.0.0",
    "husky": "^7.0.4",
    "jest": "^26.6.3",
    "lint-staged": "^13.0.3",
    "metro-react-native-babel-preset": "^0.72.0",
    "prettier": "^2.5.1",
    "pretty-quick": "^3.1.3",
    "react-native-dotenv": "^3.3.1",
    "react-native-svg-transformer": "^1.0.0",
    "react-test-renderer": "18.0.0",
    "typescript": "^4.7.4",
    "yarn-upgrade-all": "^0.6.1"
  },
  "resolutions": {
    "@types/react": "^17",
    "react-native-redash": "18.0.0"
  },
  "jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }
}

Snack or a link to a repository

https://github.com/nomi9995/fabric-reanimated-repro

Reanimated version

3.0.0-rc.0

React Native version

0.69.4

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo bare workflow

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iPhone 13 pro max

Acknowledgements

Yes

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
tomekzawcommented, Aug 23, 2022

Thanks for the update! Closing the issue as it’s not a bug in Reanimated. Looking forward to Fabric support in Expo! 😄

1reaction
numandev1commented, Aug 12, 2022

@tomekzaw It is also showing me “Default - C Header” all three file hermes.h, LongLivedObject.h and REAEventDispatcher.h

here you can find hermes.h ios/Pods/hermes-engine/destroot/include/hermes/hermes.h image

My Xcode is lazy. this bug made me soo much tired. I will come back to this bug another day. thanks a lot for your help

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not build module 'React' - ios - Stack Overflow
I am stuck with this error Could not build module 'React' while trying to integrate react native to an existing iOS project. Any...
Read more >
How to solve the "Could not build module 'Foundation'" error ...
Hello,. I met this problem when I start my first Objective-C project. I use the Xcode 11 Beta 2, and when I just...
Read more >
Code-Splitting - React
Bundling is the process of following imported files and merging them into a single file: a “bundle”. This bundle can then be included...
Read more >
React Native SDK Troubleshooting - Visual Studio App Center
h ' file not found. This error appears when RN core libraries aren't referenced correctly, which can be caused by different kinds of...
Read more >
Switching to Preact (from React)
Aliasing in Node using module-alias. For SSR purposes, if you are not using a bundler like webpack to build your server side code,...
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