react-native-screens: [3.18.1] requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager

Description

After upgrading to 3.18.1 it throwed:

Invariant Violation: requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager.

it seems that the introduction of react-native-config.js won’t allow the package to be bundled sincemetro throws:

warn Package react-native-screens has been ignored because it contains invalid configuration. Reason: "dependency.platforms.android.componentDescriptors" is not allowed

ps. I’m using yarn 3.2.4

Steps to reproduce

  1. Install/Upgrade to 3.18.1
  2. pod install
  3. build app

Snack or a link to a repository

no snack

Screens version

3.18.1

React Native version

0.68.3

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Real device

Device model

iPhone 13

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 51 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you @Letty! I’ll have 3.18.2 released with this patch soon!

Steps I have done:

  1. edited package.json to "react-native-screens": "^3.18.0"
  2. deleted node_modules & package-lock.json
  3. deleted Pods & Podfile.lock
  4. npm cache clean --force
  5. npm install
  6. pod install
  7. react-native run-ios --reset-cache

And I still get same warning.

Thanks for your help!

I’m testing fix by my self now, but would appreciate if any of you would confirm, that this resolves the issue: #1615

Install react-native-screens as follows in your package.json:

"react-native-screens": "software-mansion/react-native-screens#49cc61e1fa9926a671d32bbb634a2c43c999e122"

I tried it in my project at it works like charm! Thank you for the quick reaction on this. (My RN version is 0.68.4)

guys why there´s no any clear fix for this ? it looks like all are trowing stuff against the wall to see if it sticks… the feature owner should come up with a solution asap! i´m using expo native react and same error here!

ASAP is a very hard word. Please remember this is open source work. So people are investing time doing cool stuff mostly for free. 😃. I’m sure a better word choice goes a long way. Thanks

3.18.2 is released, the issue should be resolved.

In case of any problems just tag me here

It is not working for me ^3.18.2 is not working.

@ToniNikolaev23, #1615 (solution to this issue) causes issues with Example applications in the repository so it is holding release for now, but I’m working on it.

Steps I have done:

1. edited `package.json to` `"react-native-screens": "^3.18.0"`

2. deleted `node_modules` & `package-lock.json`

3. deleted `Pods` & `Podfile.lock`

4. `npm cache clean --force  `

5. `npm install`

6. `pod install`

7. `react-native run-ios --reset-cache`

And I still get same warning.

Thanks for your help!

You have to pin this version "react-native-screens": "3.18.0"

In case you are wondering what the signs mean: https://stackoverflow.com/questions/22137778/what-does-mean-in-package-json-versioning

I solved this error by changing the version to 3.3.2 and using yarn instead of npm.

Here are the commands I followed:

yarn add nativewind yarn add --dev tailwindcss@3.3.2

then restart the app

3.18.2 is released, the issue should be resolved.

In case of any problems just tag me here

I’m testing fix by my self now, but would appreciate if any of you would confirm, that this resolves the issue: #1615

Install react-native-screens as follows in your package.json:

"react-native-screens": "software-mansion/react-native-screens#49cc61e1fa9926a671d32bbb634a2c43c999e122"

Update: the branch was deleted, before 3.18.2 is released please use current main:

"react-native-screens": "software-mansion/react-native-screens#0f684a76276709df927dab116f7addcb9b8c2a6b"

On my project downgrading to v3.18.0 does not work. Still get the

Package react-native-screens has been ignored because it contains invalid configuration. Reason: "dependency.platforms.android.componentDescriptors" is not allowed

message when building the app.

Since the react-native-safe-area-context was bumped to 4.4.1 I think 3.18.1 is no longer supported on react-native < 0.70.

downgrading to 3.18.0 works just fine.

So this is how I effectively tackled this:

  1. Run ./gradlew build in android folder to identify the root cause of the error (Mine was a missing file in the NDK folder)
  2. Delete the NDK version folder mentioned in the error message (e.g., ~/Library/Android/sdk/ndk/25.1.8937393).
  3. Run ./gradlew clean followed by ./gradlew build to clean and rebuild with a corrected NDK setup.

The full piece can be found here: https://dev.to/ambasseugene/how-to-resolve-requirenativecomponent-rnsscreenstackheaderconfig-was-not-found-in-the-uimanager-in-react-native-17dh

@kkafar no good deed unpunished 😉. Thanks for react-native-screens and we have 3.18.0 until things are sorted. Cheers

Steps I have done:

1. edited `package.json to` `"react-native-screens": "^3.18.0"`

2. deleted `node_modules` & `package-lock.json`

3. deleted `Pods` & `Podfile.lock`

4. `npm cache clean --force  `

5. `npm install`

6. `pod install`

7. `react-native run-ios --reset-cache`

And I still get same warning. Thanks for your help!

You have to pin this version "react-native-screens": "3.18.0"

In case you are wondering what the signs mean: https://stackoverflow.com/questions/22137778/what-does-mean-in-package-json-versioning

Sorry my fault. After pinning the package the warning ist finally gone! Thanks!

Hi all, only change 3.18.1 introduced was to add react-native.config.js file which is required for the library to run on new architecture, there were no changes to any dependency versions.

I’ll dive into the problem and let you know asap whats going on

Since the react-native-safe-area-context was bumped to 4.4.1 I think 3.18.1 is no longer supported on react-native < 0.70.

It was only bumped in FabricTestExample application and should have no impact on library usage.

same issue

after “react-native start --reset-cache” i find the warn message below Package react-native-screens has been ignored because it contains invalid configuration. Reason: "dependency.platforms.android.componentDescriptors

also, i can’t build android