microsoft / react-native-macos

A framework for building native macOS apps with React.
https://microsoft.github.io/react-native-windows/
MIT License
3.35k stars 128 forks source link

yarn start:macos / Xcode build error too #2142

Open jhay06 opened 1 week ago

jhay06 commented 1 week ago

Environment

react-native -v = can't query by command , but in package.json its 
    "react-native": "0.71", but in npm ls react-native the complete version is 0.71.19
npm ls react-native-macos =  react-native-macos@0.71.36
node -v: - v22.3.0
npm -v: - v10.8.1
yarn --version: - v1.22.22
xcodebuild -version: Xcode 15.2
Build version 15C500b

Steps to reproduce the bug

  1. i just npx react-native-macos-init on my existing react-native package
  2. the command tells how to run it after init """ Run instructions for macOS: • npx react-native run-macos
    • or - • Open macos/cdms-app.xcworkspace in Xcode or run "xed -b macos" • yarn start:macos • Hit the Run button """

then i run npx react-native run-macos , it fails with the error bellow """ CompileC /Users/xxx/Library/Developer/Xcode/DerivedData/xxxxx-apslssjfyuyzkdffepeastytryrj/Build/Intermediates.noindex/Pods.build/Debug/Expo.build/Objects-normal/x86_64/EXAppDefinesLoader.o /Users/xxx/project/xxxxx/build/metro/node_modules/expo/ios/EXAppDefinesLoader.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'Expo' from project 'Pods') (1 failure)

""" then i tried to open the xcode project and hit run and the got the error below

/Users/xxx/project/xxxxxx/build/metro/node_modules/expo/ios/EXAppDefinesLoader.m:5:9 'ExpoModulesCore/ExpoModulesCore.h' file not found

then i tried the yarn start:macos as per the run instruction . but yarn start:macos was not found warning ../../../package.json: No license field error Command "start:macos" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected Behavior

it will start the desktop app

Actual Behavior

error nothing happens

Reproducible Demo

No response

Additional context

No response

Saadnajmi commented 3 days ago

It looks like you're using Expo. Expo doesn't officially support React Native macOS out of the box, so there' likely additional work to get it running.