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

requireNativeComponent: RNSScreen was no found in the UIMANAGER #1674

Closed
my-name-is-nheo opened this issue Jan 3, 2023 · 6 comments
Closed
Assignees
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@my-name-is-nheo
Copy link

my-name-is-nheo commented Jan 3, 2023

Description

I have the latest versions of

  • @react-navigation/bottoms-tabs
  • @react-navigation/drawer
  • @react-navigation/elements
  • @react-navigation/native
  • @react-navigation/stack
  • react-native-reanimated
  • react-native-safe-area-context
  • react-native-screens
    installed.
    image

image

However when I built my app, I ended up getting this error. I recently converted to pnpm and read react-native does not support symlinks so I added a configuration to flat out the node_modules without any. (more this here)

image

After clearing cache, reinstall node_modules, and pods, I've navigated to my pods directory on XCode and I couldn't locate the RNSScreen pod.
image
(Am I supposed to see a RNSScreen pod in the list?)

I tried manually installing the pod
pod 'RNScreens', :path => '../node_modules/react-native-screens/RNScreens.podspec'

The error goes away, but got a duplicate pod error when trying to deploy to TestFlight. I was able to manually delete the duplicate pod (accessibilityResource) and publish, but I know this is not the way to fix this.

image

Any help would be greatly appreciated.

Steps to reproduce

  1. Installed latest react-navigation packages
  2. delete node_modules && pnpm install
  3. cd ios/ && pod install
  4. watchman watch-del-all
  5. pnpm run clean:start (--clear-cache)
  6. fastlane command to deploy

Snack or a link to a repository

This link is just the index.js of my app
https://snack.expo.dev/U41fM6iPM

Screens version

3.18.2

React Native version

0.67.5

Platforms

iOS

JavaScript runtime

V8

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iphone 13

Acknowledgements

Yes

@github-actions github-actions bot added Repro provided A reproduction with a snack or repo is provided Platform: iOS This issue is specific to iOS labels Jan 3, 2023
@my-name-is-nheo
Copy link
Author

my-name-is-nheo commented Jan 3, 2023

checking if this comment will work

EDIT: did not work.

@kkafar kkafar self-assigned this Jan 21, 2023
@kkafar
Copy link
Member

kkafar commented Jan 21, 2023

Hi @my-name-is-nheo!

(Am I supposed to see a RNSScreen pod in the list?)

Yes, the RNScreens pod should definitely should be there.

requireNativeComponent: RNSScreen was no found in the UIManager

This error message is often a sign that the library has not been linked properly.

It's hard to tell what is wrong with pnpm setup right now (I'm not really familiar with this tool), but React Native project is expected to have specific structure and React Native (and react-native-screens library) in few places rely on that.

Would you mind running the following command in your project directory, and provide me with the result?

yarn react-native config

(Try to use yarn or npm tools, I've no idea whether pnpm has some influence on command result or not)

@kkafar kkafar added the Close when stale This issue is going to be closed when there is no activity for a while label Jan 21, 2023
@Desintegrator
Copy link

Desintegrator commented Jan 30, 2023

Same issue
I was able to fix it when added next line in Podfile
pod 'RNScreens', :path => '../node_modules/react-native-screens'

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Jan 30, 2023
@kkafar kkafar added the Close when stale This issue is going to be closed when there is no activity for a while label Feb 11, 2023
@github-actions github-actions bot closed this as completed Mar 3, 2023
@rohanudhwani
Copy link

rohanudhwani commented Dec 11, 2023

Hi @kkafar

I installed the package correctly, using rn version 0.73.0, rnscreens version 3.29.0 which I can confirm from my cmd.

My github repo is here which you can directly use to troubleshoot: github repo

I am still getting an error as follows
Image 1
Image 2
Image 3

I have setup my MainActivity.kt as follows as read in the readme.

package com.cinepulse

import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate
import android.os.Bundle

class MainActivity : ReactActivity() {

  /**
   * Returns the name of the main component registered from JavaScript. This is used to schedule
   * rendering of the component.
   */
  override fun getMainComponentName(): String = "CinePulse"

  /**
   * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
   * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
   */
  override fun createReactActivityDelegate(): ReactActivityDelegate =
      DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(null)
  }
}

yarn react-native config, this command shows the following in my case:

yarn run v1.22.21
$ "C:\Users\rohan\Documents\React Native Projects\Movie TIcket Booking\CinePulse\node_modules\.bin\react-native" config
{
  "root": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse",
  "reactNativePath": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native",
  "reactNativeVersion": "0.73",
  "dependencies": {
    "@react-native-community/masked-view": {
      "root": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\@react-native-community\\masked-view", 
      "name": "@react-native-community/masked-view",
      "platforms": {
        "ios": {
          "podspecPath": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\@react-native-community\\masked-view\\RNCMaskedView.podspec",
          "version": "0.1.11",
          "configurations": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\@react-native-community\\masked-view\\android",
          "packageImportPath": "import org.reactnative.maskedview.RNCMaskedViewPackage;",
          "packageInstance": "new RNCMaskedViewPackage()",
          "buildTypes": [],
          "componentDescriptors": [],
          "cmakeListsPath": "C:/Users/rohan/Documents/React Native Projects/Movie TIcket Booking/CinePulse/node_modules/@react-native-community/masked-view/android/build/generated/source/codegen/jni/CMakeLists.txt"
        }
      }
    },
    "react-native-gesture-handler": {
      "root": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-gesture-handler",
      "name": "react-native-gesture-handler",
      "platforms": {
        "ios": {
          "podspecPath": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-gesture-handler\\RNGestureHandler.podspec",
          "version": "2.14.0",
          "configurations": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-gesture-handler\\android",
          "packageImportPath": "import com.swmansion.gesturehandler.RNGestureHandlerPackage;",
          "packageInstance": "new RNGestureHandlerPackage()",
          "buildTypes": [],
          "libraryName": "rngesturehandler_codegen",
          "componentDescriptors": [
            "RNGestureHandlerButtonComponentDescriptor",
            "RNGestureHandlerRootViewComponentDescriptor"
          ],
          "cmakeListsPath": "C:/Users/rohan/Documents/React Native Projects/Movie TIcket Booking/CinePulse/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/CMakeLists.txt"
        }
      }
    },
    "react-native-reanimated": {
      "root": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-reanimated",
      "name": "react-native-reanimated",
      "platforms": {
        "ios": {
          "podspecPath": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-reanimated\\RNReanimated.podspec",
          "version": "3.6.1",
          "configurations": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-reanimated\\android",
          "packageImportPath": "import com.swmansion.reanimated.ReanimatedPackage;",
          "packageInstance": "new ReanimatedPackage()",
          "buildTypes": [],
          "componentDescriptors": [],
          "cmakeListsPath": "C:/Users/rohan/Documents/React Native Projects/Movie TIcket Booking/CinePulse/node_modules/react-native-reanimated/android/build/generated/source/codegen/jni/CMakeLists.txt"
        }
      }
    },
    "react-native-safe-area-context": {
      "root": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-safe-area-context",       
      "name": "react-native-safe-area-context",
      "platforms": {
        "ios": {
          "podspecPath": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-safe-area-context\\react-native-safe-area-context.podspec",
          "version": "4.8.0",
          "configurations": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-safe-area-context\\android",
          "packageImportPath": "import com.th3rdwave.safeareacontext.SafeAreaContextPackage;",
          "packageInstance": "new SafeAreaContextPackage()",
          "buildTypes": [],
          "libraryName": "safeareacontext",
          "componentDescriptors": [
            "RNCSafeAreaProviderComponentDescriptor",
            "RNCSafeAreaViewComponentDescriptor"
          ],
          "cmakeListsPath": "C:/Users/rohan/Documents/React Native Projects/Movie TIcket Booking/CinePulse/node_modules/react-native-safe-area-context/android/src/main/jni/CMakeLists.txt"
        }
      }
    },
    "react-native-screens": {
      "root": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-screens",
      "name": "react-native-screens",
      "platforms": {
        "ios": {
          "podspecPath": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-screens\\RNScreens.podspec",
          "version": "3.29.0",
          "configurations": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-screens\\android",
          "packageImportPath": "import com.swmansion.rnscreens.RNScreensPackage;",
          "packageInstance": "new RNScreensPackage()",
          "buildTypes": [],
          "libraryName": "rnscreens",
          "componentDescriptors": [
            "RNSFullWindowOverlayComponentDescriptor",
            "RNSScreenContainerComponentDescriptor",
            "RNSScreenNavigationContainerComponentDescriptor",
            "RNSScreenStackHeaderConfigComponentDescriptor",
            "RNSScreenStackHeaderSubviewComponentDescriptor",
            "RNSScreenStackComponentDescriptor",
            "RNSSearchBarComponentDescriptor",
            "RNSScreenComponentDescriptor"
          ],
          "cmakeListsPath": "C:/Users/rohan/Documents/React Native Projects/Movie TIcket Booking/CinePulse/node_modules/react-native-screens/android/src/main/jni/CMakeLists.txt"
        }
      }
    },
    "react-native-vector-icons": {
      "root": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-vector-icons",
      "name": "react-native-vector-icons",
      "platforms": {
        "ios": {
          "podspecPath": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-vector-icons\\RNVectorIcons.podspec",
          "version": "10.0.2",
          "configurations": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\node_modules\\react-native-vector-icons\\android",
          "packageImportPath": "import com.oblador.vectoricons.VectorIconsPackage;",
          "packageInstance": "new VectorIconsPackage()",
          "buildTypes": [],
          "libraryName": "RNVectorIconsSpec",
          "componentDescriptors": [],
          "cmakeListsPath": "C:/Users/rohan/Documents/React Native Projects/Movie TIcket Booking/CinePulse/node_modules/react-native-vector-icons/android/build/generated/source/codegen/jni/CMakeLists.txt"
        }
      }
    }
  },
  "commands": [
    {
      "name": "log-ios",
      "description": "starts iOS device syslog tail",
      "options": [
        {
          "name": "--interactive",
          "description": "Explicitly select simulator to tail logs from. By default it will tail logs from the first booted and available simulator."    
        }
      ]
    },
    {
      "name": "run-ios",
      "description": "builds your app and starts it on iOS simulator",
      "examples": [
        {
          "desc": "Run on a different simulator, e.g. iPhone SE (2nd generation)",
          "cmd": "npx react-native run-ios --simulator \"iPhone SE (2nd generation)\""
        },
        {
          "desc": "Run on a connected device, e.g. Max's iPhone",
          "cmd": "npx react-native run-ios --device \"Max's iPhone\""
        },
        {
          "desc": "Run on the AppleTV simulator",
          "cmd": "npx react-native run-ios --simulator \"Apple TV\"  --scheme \"helloworld-tvOS\""
        }
      ],
      "options": [
        {
          "name": "--mode <string>",
          "description": "Explicitly set the scheme configuration to use. This option is case sensitive."
        },
        {
          "name": "--scheme <string>",
          "description": "Explicitly set Xcode scheme to use"
        },
        {
          "name": "--destination <string>",
          "description": "Explicitly extend destination e.g. \"arch=x86_64\""
        },
        {
          "name": "--verbose",
          "description": "Do not use xcbeautify or xcpretty even if installed"
        },
        {
          "name": "--xcconfig [string]",
          "description": "Explicitly set xcconfig to use"
        },
        {
          "name": "--buildFolder <string>",
          "description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\"."
        },
        {
          "name": "--extra-params <string>",
          "description": "Custom params that will be passed to xcodebuild command."
        },
        {
          "name": "--target <string>",
          "description": "Explicitly set Xcode target to use."
        },
        {
          "name": "--interactive",
          "description": "Explicitly select which scheme and configuration to use before running a build"
        },
        {
          "name": "--force-pods",
          "description": "Force CocoaPods installation"
        },
        {
          "name": "--no-packager",
          "description": "Do not launch packager while running the app"
        },
        {
          "name": "--port <number>",
          "default": 8081
        },
        {
          "name": "--terminal <string>",
          "description": "Launches the Metro Bundler in a new window using the specified terminal path."
        },
        {
          "name": "--binary-path <string>",
          "description": "Path relative to project root where pre-built .app binary lives."
        },
        {
          "name": "--list-devices",
          "description": "List all available iOS devices and simulators and let you choose one to run the app. "
        },
        {
          "name": "--simulator <string>",
          "description": "Explicitly set the simulator to use. Optionally set the iOS version between parentheses at the end to match an exact version: \"iPhone 15 (17.0)\""
        },
        {
          "name": "--device <string>",
          "description": "Explicitly set the device to use by name. The value is not required if you have a single device connected."
        },
        {
          "name": "--udid <string>",
          "description": "Explicitly set the device to use by UDID"
        }
      ]
    },
    {
      "name": "build-ios",
      "description": "builds your app for iOS platform",
      "examples": [
        {
          "desc": "Build the app for all iOS devices in Release mode",
          "cmd": "npx react-native build-ios --mode \"Release\""
        }
      ],
      "options": [
        {
          "name": "--mode <string>",
          "description": "Explicitly set the scheme configuration to use. This option is case sensitive."
        },
        {
          "name": "--scheme <string>",
          "description": "Explicitly set Xcode scheme to use"
        },
        {
          "name": "--destination <string>",
          "description": "Explicitly extend destination e.g. \"arch=x86_64\""
        },
        {
          "name": "--verbose",
          "description": "Do not use xcbeautify or xcpretty even if installed"
        },
        {
          "name": "--xcconfig [string]",
          "description": "Explicitly set xcconfig to use"
        },
        {
          "name": "--buildFolder <string>",
          "description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\"."
        },
        {
          "name": "--extra-params <string>",
          "description": "Custom params that will be passed to xcodebuild command."
        },
        {
          "name": "--target <string>",
          "description": "Explicitly set Xcode target to use."
        },
        {
          "name": "--interactive",
          "description": "Explicitly select which scheme and configuration to use before running a build"
        },
        {
          "name": "--force-pods",
          "description": "Force CocoaPods installation"
        }
      ]
    },
    {
      "name": "log-android",
      "description": "starts logkitty"
    },
    {
      "name": "run-android",
      "description": "builds your app and starts it on a connected Android emulator or device",
      "options": [
        {
          "name": "--mode <string>",
          "description": "Specify your app's build variant"
        },
        {
          "name": "--tasks <list>",
          "description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments."
        },
        {
          "name": "--active-arch-only",
          "description": "Build native libraries only for the current device architecture for debug builds.",
          "default": false
        },
        {
          "name": "--extra-params <string>",
          "description": "Custom params passed to gradle build command"
        },
        {
          "name": "--interactive",
          "description": "Explicitly select build type and flavour to use before running a build"
        },
        {
          "name": "--no-packager",
          "description": "Do not launch packager while running the app"
        },
        {
          "name": "--port <number>",
          "default": 8081
        },
        {
          "name": "--terminal <string>",
          "description": "Launches the Metro Bundler in a new window using the specified terminal path."
        },
        {
          "name": "--appId <string>",
          "description": "Specify an applicationId to launch after build. If not specified, `package` from AndroidManifest.xml will be used.",
          "default": ""
        },
        {
          "name": "--appIdSuffix <string>",
          "description": "Specify an applicationIdSuffix to launch after build.",
          "default": ""
        },
        {
          "name": "--main-activity <string>",
          "description": "Name of the activity to start"
        },
        {
          "name": "--deviceId <string>",
          "description": "builds your app and starts it on a specific device/simulator with the given device id (listed by running \"adb devices\" on the command line)."
        },
        {
          "name": "--list-devices",
          "description": "Lists all available Android devices and simulators and let you choose one to run the app",
          "default": false
        },
        {
          "name": "--binary-path <string>",
          "description": "Path relative to project root where pre-built .apk binary lives."
        },
        {
          "name": "--user <number>",
          "description": "Id of the User Profile you want to install the app on."
        }
      ]
    },
    {
      "name": "build-android",
      "description": "builds your app",
      "options": [
        {
          "name": "--mode <string>",
          "description": "Specify your app's build variant"
        },
        {
          "name": "--tasks <list>",
          "description": "Run custom Gradle tasks. By default it's \"assembleDebug\". Will override passed mode and variant arguments."
        },
        {
          "name": "--active-arch-only",
          "description": "Build native libraries only for the current device architecture for debug builds.",
          "default": false
        },
        {
          "name": "--extra-params <string>",
          "description": "Custom params passed to gradle build command"
        },
        {
          "name": "--interactive",
          "description": "Explicitly select build type and flavour to use before running a build"
        }
      ]
    },
    {
      "name": "bundle",
      "description": "Build the bundle for the provided JavaScript entry file.",
      "options": [
        {
          "name": "--entry-file <path>",
          "description": "Path to the root JS file, either absolute or relative to JS root"
        },
        {
          "name": "--platform <string>",
          "description": "Either \"ios\" or \"android\"",
          "default": "ios"
        },
        {
          "name": "--transformer <string>",
          "description": "Specify a custom transformer to be used"
        },
        {
          "name": "--dev [boolean]",
          "description": "If false, warnings are disabled and the bundle is minified",
          "default": true
        },
        {
          "name": "--minify [boolean]",
          "description": "Allows overriding whether bundle is minified. This defaults to false if dev is true, and true if dev is false. Disabling minification can be useful for speeding up production builds for testing purposes."
        },
        {
          "name": "--bundle-output <string>",
          "description": "File name where to store the resulting bundle, ex. /tmp/groups.bundle"
        },
        {
          "name": "--bundle-encoding <string>",
          "description": "Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).",
          "default": "utf8"
        },
        {
          "name": "--max-workers <number>",
          "description": "Specifies the maximum number of workers the worker-pool will spawn for transforming files. This defaults to the number of the cores available on your machine."
        },
        {
          "name": "--sourcemap-output <string>",
          "description": "File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map"
        },
        {
          "name": "--sourcemap-sources-root <string>",
          "description": "Path to make sourcemap's sources entries relative to, ex. /root/dir"
        },
        {
          "name": "--sourcemap-use-absolute-path",
          "description": "Report SourceMapURL using its full path",
          "default": false
        },
        {
          "name": "--assets-dest <string>",
          "description": "Directory name where to store assets referenced in the bundle"
        },
        {
          "name": "--unstable-transform-profile <string>",
          "description": "Experimental, transform JS for a specific JS engine. Currently supported: hermes, hermes-canary, default",
          "default": "default"
        },
        {
          "name": "--asset-catalog-dest [string]",
          "description": "Path where to create an iOS Asset Catalog for images"
        },
        {
          "name": "--reset-cache",
          "description": "Removes cached files",
          "default": false
        },
        {
          "name": "--read-global-cache",
          "description": "Try to fetch transformed JS code from the global cache, if configured.",
          "default": false
        },
        {
          "name": "--config <string>",
          "description": "Path to the CLI configuration file"
        }
      ]
    },
    {
      "name": "ram-bundle",
      "description": "Build the RAM bundle for the provided JavaScript entry file. See https://reactnative.dev/docs/ram-bundles-inline-requires.",       
      "options": [
        {
          "name": "--entry-file <path>",
          "description": "Path to the root JS file, either absolute or relative to JS root"
        },
        {
          "name": "--platform <string>",
          "description": "Either \"ios\" or \"android\"",
          "default": "ios"
        },
        {
          "name": "--transformer <string>",
          "description": "Specify a custom transformer to be used"
        },
        {
          "name": "--dev [boolean]",
          "description": "If false, warnings are disabled and the bundle is minified",
          "default": true
        },
        {
          "name": "--minify [boolean]",
          "description": "Allows overriding whether bundle is minified. This defaults to false if dev is true, and true if dev is false. Disabling minification can be useful for speeding up production builds for testing purposes."
        },
        {
          "name": "--bundle-output <string>",
          "description": "File name where to store the resulting bundle, ex. /tmp/groups.bundle"
        },
        {
          "name": "--bundle-encoding <string>",
          "description": "Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).",
          "default": "utf8"
        },
        {
          "name": "--max-workers <number>",
          "description": "Specifies the maximum number of workers the worker-pool will spawn for transforming files. This defaults to the number of the cores available on your machine."
        },
        {
          "name": "--sourcemap-output <string>",
          "description": "File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map"
        },
        {
          "name": "--sourcemap-sources-root <string>",
          "description": "Path to make sourcemap's sources entries relative to, ex. /root/dir"
        },
        {
          "name": "--sourcemap-use-absolute-path",
          "description": "Report SourceMapURL using its full path",
          "default": false
        },
        {
          "name": "--assets-dest <string>",
          "description": "Directory name where to store assets referenced in the bundle"
        },
        {
          "name": "--unstable-transform-profile <string>",
          "description": "Experimental, transform JS for a specific JS engine. Currently supported: hermes, hermes-canary, default",
          "default": "default"
        },
        {
          "name": "--asset-catalog-dest [string]",
          "description": "Path where to create an iOS Asset Catalog for images"
        },
        {
          "name": "--reset-cache",
          "description": "Removes cached files",
          "default": false
        },
        {
          "name": "--read-global-cache",
          "description": "Try to fetch transformed JS code from the global cache, if configured.",
          "default": false
        },
        {
          "name": "--config <string>",
          "description": "Path to the CLI configuration file"
        },
        {
          "name": "--indexed-ram-bundle",
          "description": "Force the \"Indexed RAM\" bundle file format, even when building for android",
          "default": false
        }
      ]
    },
    {
      "name": "start",
      "description": "Start the React Native development server.",
      "options": [
        {
          "name": "--port <number>"
        },
        {
          "name": "--host <string>",
          "default": ""
        },
        {
          "name": "--projectRoot <path>",
          "description": "Path to a custom project root"
        },
        {
          "name": "--watchFolders <list>",
          "description": "Specify any additional folders to be added to the watch list"
        },
        {
          "name": "--assetPlugins <list>",
          "description": "Specify any additional asset plugins to be used by the packager by full filepath"
        },
        {
          "name": "--sourceExts <list>",
          "description": "Specify any additional source extensions to be used by the packager"
        },
        {
          "name": "--max-workers <number>",
          "description": "Specifies the maximum number of workers the worker-pool will spawn for transforming files. This defaults to the number of the cores available on your machine."
        },
        {
          "name": "--transformer <string>",
          "description": "Specify a custom transformer to be used"
        },
        {
          "name": "--reset-cache, --resetCache",
          "description": "Removes cached files"
        },
        {
          "name": "--custom-log-reporter-path, --customLogReporterPath <string>",
          "description": "Path to a JavaScript file that exports a log reporter as a replacement for TerminalReporter"
        },
        {
          "name": "--https",
          "description": "Enables https connections to the server"
        },
        {
          "name": "--key <path>",
          "description": "Path to custom SSL key"
        },
        {
          "name": "--cert <path>",
          "description": "Path to custom SSL cert"
        },
        {
          "name": "--config <string>",
          "description": "Path to the CLI configuration file"
        },
        {
          "name": "--no-interactive",
          "description": "Disables interactive mode"
        },
        {
          "name": "--experimental-debugger",
          "description": "[Experimental] Enable the new debugger experience and 'j' to debug. This enables the new frontend experience only: connection reliability and some basic features are unstable in this release."
        }
      ]
    }
  ],
  "healthChecks": [],
  "platforms": {
    "ios": {},
    "android": {}
  },
  "project": {
    "ios": {
      "sourceDir": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\ios",
      "xcodeProject": {
        "name": "CinePulse.xcodeproj",
        "isWorkspace": false
      },
      "automaticPodsInstallation": true
    },
    "android": {
      "sourceDir": "C:\\Users\\rohan\\Documents\\React Native Projects\\Movie TIcket Booking\\CinePulse\\android",
      "appName": "app",
      "packageName": "com.cinepulse",
      "applicationId": "com.cinepulse",
      "mainActivity": ".MainActivity",
      "unstable_reactLegacyComponentNames": []
    }
  }
}
Done in 2.78s.

I have also seen all the stackoverflow and github pages of all the possible solutions and tried them all, but still facing these issues. I faced the same issue in a previous project I was trying, and hence left it because I couldnt solve it. This issue came up in this one as well, while my project is relatively clean and simple right now.

I used gradle clean as well and tried restarting my machine and vs code as well. and the reset cache of metro as well.

I am unable to find the solution, please help. I am still learning a lot

@hank619
Copy link

hank619 commented Dec 21, 2023

For those who donesn't work even if react-native-screens is added to package.json, pls try yarn remove @react-native-community/cli in case you hanve already installed an older version of @react-native-community/cli soreact-native config won't analysis the react-native-screeens library properly.

No worry, @react-native-community/cli is automatically imported by react-native so won't cause any error.

Relevant code are here

@Mary-Grigoryan
Copy link

Mary-Grigoryan commented Feb 24, 2024

I have tried all of the above steps and still have the error.

This is my package.json:

{
"name": "ReactProject",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native-community/cli": "^12.3.6",
"@react-native-firebase/app": "^18.9.0",
"@react-native-firebase/auth": "^18.9.0",
"@react-native-masked-view/masked-view": "^0.3.1",
"@react-navigation/native": "^6.1.12",
"@react-navigation/stack": "^6.3.23",
"firebase": "^10.6.0",
"react": "18.2.0",
"react-native": "0.73.4",
"react-native-gesture-handler": "^2.14.0",
"react-native-reanimated": "^3.7.1",
"react-native-safe-area-context": "^4.9.0",
"react-native-screens": "^3.29.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.73.21",
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.2.0",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

6 participants