Skip to content

Missing Semicolon in node-modules/react-native/index.js at line 313 #50683

Closed
@chooseongwoo

Description

@chooseongwoo

Description

Description
I'm encountering a Missing Semicolon syntax error in the index.js file of React Native when building the project. The error occurs specifically at line 313 where the following code is present:

} as ReactNativePublicAPI;

It appears that the semicolon is missing after this line, causing the build to fail.

Steps to reproduce

  1. Install React Native project.
  2. Attempt to build the project 'react-native run-ios'
  3. The error Missing Semicolon occurs in the index.js file at line 313.

React Native Version

^0.79.0

Affected Platforms

Runtime - iOS

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

System:
  OS: macOS 15.3.2
  CPU: (8) arm64 Apple M2
  Memory: 111.97 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.1
    path: ~/.nvm/versions/node/v20.11.1/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.11.1/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v20.11.1/bin/npm
  Watchman:
    version: 2025.03.10.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: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13208083
  Xcode:
    version: 16.3/16E140
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: javac 22
    path: /usr/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/chooseongwoo/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.0
    wanted: 18.0.0
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.79.0
    wanted: 0.79.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

SyntaxError: /Users/chooseongwoo/Coding/Project/SPOTT/node_modules/react-native/index.js: Missing semicolon. (313:1)

  311 |   },
  312 |   // #endregion
> 313 | } as ReactNativePublicAPI;
      |  ^
  314 |
  315 | if (__DEV__) {
  316 |   /* $FlowFixMe[prop-missing] This is intentional: Flow will error when

Reproducer

https://github.com/chooseongwoo/spot

Screenshots and Videos

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.Resolution: AnsweredWhen the issue is resolved with a simple answer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions