react-native-module-template icon indicating copy to clipboard operation
react-native-module-template copied to clipboard

React Navigation error within the library

Open robinrwmjv opened this issue 3 years ago • 2 comments

I am trying to create a StackNavigator instance inside the library index.tsx to test out the navigation capabilities. I am getting the below error. Has anyone got this working within a library?

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

Dependencies "dependencies": { "@react-native-community/masked-view": "^0.1.11", "@react-navigation/native": "^6.0.8", "@react-navigation/native-stack": "^6.5.0", "react-native-gesture-handler": "^2.3.2", "react-native-reanimated": "^2.4.1", "react-native-safe-area-context": "^4.1.3", "react-native-screens": "^3.13.1" }

robinrwmjv avatar Mar 14 '22 19:03 robinrwmjv

If I explicitly add all the npm packages in the example project it works fine but the dependencies from the library are not linked in the example project.

robinrwmjv avatar Mar 15 '22 15:03 robinrwmjv

Not sure I understand - are you making a library that depends on all those libraries you mentioned above?

demchenkoalex avatar Apr 10 '22 10:04 demchenkoalex