Unable to migrate react-navigation from 5 to 6 for projects using `react-navigation/compat`

Viewed 183

About the compat discussions in react-navigation's roadmap for v6 https://github.com/react-navigation/react-navigation/issues/8981

the package will be removed from main branch but will stay on 5.x branch as well as npm, and will continue to work with 6.x.

I migrated react-navigation version from 4 to 5 before. In this time, I used @react-navigation/compat. It's working well. Now, I wanted to migrate 5 to 6 with @react-navigation/compat. But occurs type error in bellow code. createCompatNavigatorFactory(createStackNavigator). Unfortunately this looks like the correct error.

Do you have any good solutions to fix this error?

The versions

  "@react-navigation/compat": "5.3.20",
  "@react-navigation/native": "6.0.2",
  "@react-navigation/stack": "6.0.7",
0 Answers
Related