Skip to content

[iOS][RN 0.82][Xcode 16] RCT-Folly build fails with "Expected ';' after top level declarator" #54205

Open

Description

@WenBin0201

Description

After upgrading to React Native 0.82 and Xcode 16, my iOS build fails with the following error in RCT-Folly:

Expected ';' after top level declarator

Steps to reproduce

Upgrade React Native project to 0.82.0

Upgrade pods (pod install)

Open .xcworkspace in Xcode 16

Build the iOS target

React Native Version

0.82.0

Affected Platforms

Build - MacOS

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.2
  CPU: (10) arm64 Apple M4
  Memory: 970.17 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.16.0
    path: /opt/homebrew/opt/node@22/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.9.2
    path: /opt/homebrew/opt/node@22/bin/npm
  Watchman:
    version: 2025.05.19.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.4
      - iOS 18.4
      - macOS 15.4
      - tvOS 18.4
      - visionOS 2.4
      - watchOS 11.4
  Android SDK:
    API Levels:
      - "35"
      - "36"
    Build Tools:
      - 34.0.0
      - 35.0.0
      - 35.0.1
      - 36.0.0
    System Images:
      - android-36 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.26094.121.2513.14007798
  Xcode:
    version: 16.3/16E140
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

no

MANDATORY Reproducer

no

Screenshots and Videos

Image

Activity

  1. react-native-bot commented on Oct 20, 2025

    @react-native-bot
    Collaborator

    Warning

    Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:


    You can read more about about it on our website: How to report a bug.

  2. abisalde commented on Oct 20, 2025

    @abisalde

    I'm having almost same issues with my native modules using codegen on .mm files

    React Native 0.81.4 & Expo SDK 54.

    Ax Project app | Configuration Debug | Destination iPhone 16 Pro Max | SDK Simulator - iOS 18.2
    
    
    v ® Compile RCT<module_name>.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    v ® Compile RCT<module_name>.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    v ® Compile RCTP<module_name>.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    v ® Compile RCT<module_map>.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    v ® Compile RCTApplePay.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    
    Build failed 20/10/2025, 09:51
    583.6 seconds

    Sorry for adding the mention @cortinico any idea what could be the issue?

  3. cipolleschi commented on Oct 20, 2025

    @cipolleschi
    Contributor

    please, try with a full cleanup of the project:

    # from the iOS folder
    rm -rf Pods/ Podfile.lock *.xcworkspace
    pod deintegrate
    pod cache --clean
    
    # if you are using expo
    cd ..
    npx expo prebuild --clean
    

    And then reinstall the pods

    # from the iOS folder
    bundle exec pod install
    
    # if you are using expo
    cd ..
    npx expo prebuild
    
  4. abisalde commented on Oct 20, 2025

    @abisalde

    I'm having almost same issues with my native modules using codegen on .mm files

    React Native 0.81.4 & Expo SDK 54.

    Ax Project app | Configuration Debug | Destination iPhone 16 Pro Max | SDK Simulator - iOS 18.2

    v ® Compile RCT<module_name>.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    v ® Compile RCT<module_name>.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    v ® Compile RCTP<module_name>.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    v ® Compile RCT<module_map>.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found
    v ® Compile RCTApplePay.mm (x86_64) 3.9 seconds
    › x 'folly/coro/Coroutine.h' file not found

    Build failed 20/10/2025, 09:51
    583.6 seconds
    Sorry for adding the mention @cortinico any idea what could be the issue?

    I fixed this issue by adding to the project.pbxproj file

    					"-DFOLLY_CFG_NO_COROUTINES=1",
    					"-DFOLLY_HAVE_CLOCK_GETTIME=1",
    Image
  5. WenBin0201 commented on Oct 21, 2025

    @WenBin0201
    Author
    Image

    @cipolleschi Following the above steps still didn't fix the issue.

  6. WenBin0201 commented on Oct 22, 2025

    @WenBin0201
    Author

    I suspect that the issue might be due to the BGFMDB library being incompatible, but I haven't been able to find a solution.

  7. react-native-bot commented on Apr 20, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.

  8. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Apr 20, 2026
  9. react-native-bot commented on Oct 18, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.

  10. react-native-bot commented on Oct 18, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  11. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: AttentionIssues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.Platform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions