Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fatal error: 'ExpoModulesCore/ExpoModulesCore.h' file not found" in run-macos #2076

Closed
emmanuelproulx opened this issue Feb 14, 2024 · 3 comments
Labels
bug Something isn't working Needs: Triage 🔍

Comments

@emmanuelproulx
Copy link

Environment

react-native -v:
react-native-cli: 2.0.1
react-native: 0.73.2

npm ls react-native-macos:
mynewproject@1.0.0 /Users/me/Documents/mynewproject
└── react-native-macos@0.73.16

node -v:
v21.5.0

npm -v:
10.2.4

yarn --version:
1.22.19

xcodebuild -version:
Xcode 15.2
Build version 15C500b

Steps to reproduce the bug

Following the steps in https://microsoft.github.io/react-native-windows/docs/rnm-getting-started

  1. I started from a blank project I just created with Create React Native App using instructions here: https://github.com/expo/create-react-native-app
  2. I installed react-native-macos with npx react-native@latest init --template "react-native@^0.71.0"
  3. I added support for macos to my project by doing cd mynewproject then npx react-native-macos-init. This created the macos directory.
  4. I added support for Windows as well: npx react-native-windows-init --overwrite
  5. I ran the project with: npx react-native run-macos

Expected Behavior

A native Mac app running my blank project.

Actual Behavior

Result: Error

/Users/me/Documents/mynewproject/node_modules/expo/ios/EXAppDefinesLoader.m:5:9: fatal error: 'ExpoModulesCore/ExpoModulesCore.h' file not found
#import <ExpoModulesCore/ExpoModulesCore.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Reproducible Demo

No response

Additional context

I tried to fix it using advice found online but all the advice was regarding the iOS platform, not MacOS. So none of it worked.
I tried to run pod install from the macos folder, no error.

I also tried to build with XCode with the same error.

@emmanuelproulx emmanuelproulx added the bug Something isn't working label Feb 14, 2024
@Saadnajmi
Copy link
Collaborator

Saadnajmi commented Feb 14, 2024

Maybe @tsapeta can comment more here, but React Native macOS (and Expo) doesn't currently support adding macOS to an expo-created iOS app. You would have to run react-native-macos-init on top of an app made with the RN CLI (AKA, redo your step 1)

@tsapeta
Copy link

tsapeta commented Feb 14, 2024

Hey! Yeah, that's correct – we don't support adding macOS to expo-created projects yet. We're working on this though. Could you please open an issue in https://github.com/expo/expo repo? It's definitely not an issue in react-native-macos itself, so I think this one can be closed.

@Saadnajmi Saadnajmi closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
@Andriiklymiuk
Copy link

well, maybe someone figured out, how to add macos to expo project somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

4 participants