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.

No such module 'React' when newly integrating into an existing app (0.63.2)

See original GitHub issue

Description

Integrating React Native 0.63.2 into an existing Swift-based project does not compile with the following error on Xcode: No such module 'React'

Note: A full-example RN project is included in this ticket

React Native version:

System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 142.84 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.5.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 25, 27, 28
      Build Tools: 27.0.3, 28.0.0, 28.0.3
      System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6392135
    Xcode: 11.6/11E708 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_251 - /usr/bin/javac
    Python: 2.7.17 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: ^0.63.2 => 0.63.2 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Create a new Storyboard-based Xcode project
  2. Follow the steps described here: https://reactnative.dev/docs/integration-with-existing-apps
  3. Update the Podfile to follow the format of the latest, as described here: https://github.com/facebook/react-native/blob/v0.63.2/template/ios/Podfile
  4. Podfile here: https://github.com/algera/rnproject-error/blob/master/ios/Podfile
  5. Run pod install -> Completes successfully
  6. Open Xcode and build the project

Expected Results

Expect Xcode project to compile, link and build correctly.

Actual Results

image

Snack, code example, screenshot, or link to a repository:

Full repository available here: https://github.com/algera/rnproject-error

Related

https://github.com/facebook/react-native/issues/26256

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
chatarveercommented, Dec 20, 2020

#import <React/RCTRootView.h>

What about Swift?

1reaction
algeracommented, Oct 13, 2020

Closing as React Native version 0.63.3 has addressed this issue and is currently available in production. import React is again available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No such module 'React' - Integrating React Native into existing ...
I'm trying to add React Native into an existing iOS app developed in Swift. I created a new Swift project and followed the...
Read more >
Xcode 12.0.1 "No such module" | Apple Developer Forums
Works on a device, fails for the simulator. With a simple new iOS App project I was able to use the Cocoapods and...
Read more >
Dependency Management | React Native Developer Tools
When integrating multiple experiences into an existing app, it can sometimes be difficult to determine the dependencies that need to be installed.
Read more >
[Solved]-Xcode / React Native - "Transform Error
Coding example for the question Xcode / React Native - "Transform Error - unknown plugin 'module-resolver' "
Read more >
react-native-config - npm
Module to expose config variables to your javascript code in React Native, ... Create a new file .env in the root of your...
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