react-native-keyboard-controller: failed to create a worklet - when importing KeyboardProvider
Describe the bug
I installed the library and a
dded a swift file.
When I run the app every things work than I try to import the KEyboardProvider and I get this error
Code snippet
<KeyboardProvider statusBarTranslucent> <SafeAreaProvider> <Toaster /> <Navigation /> </SafeAreaProvider> </KeyboardProvider>
To Reproduce Steps to reproduce the behavior: npm install react-native-keyboard-controller pod install swift file in xcode run ios import KeyboardProvider
Expected behavior App run without
Screenshots
error
Smartphone (please complete the following information):
- Desktop OS: [e.g. Windows 10, MacOS 10.15.5]
- Device: [e.g. iPhone8]
- OS: [e.g. iOS 10.0]
- RN version: [e.g. 0.68.2]
- RN architecture: [e.g. old/new or paper/fabric]
- JS engine: [e.g. JSC, Hermes, v8]
- Library version: [e.g. 1.2.0]
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 16 (9 by maintainers)
Actually I thought a little bit more and decided, that for now I’ll close the issue - now it’s mandatory to install reanimated.
Maybe in future I’ll revisit the approach and make the reanimated dependency optional, but right now all components (
KeyboardAvoidingView,KeyboardAwareScrollViewandKeyboardStcikyView) are using and heavily rely on reanimated, so I’ll keep it mandatory and close the issue.Thanks @pouyaemami and @ShaulBenDavid for your reports and help to resolve the problem 💪
No, I believe you did everything correctly - for some reasons I missed this info in my installation guide 🙈 I’ll fix it shortly 👍
In
react-nativeworld declaring something aspeerDependencywill not add it in Pod and will not link it natively, so yeah,react-native-reanimatedhas to be declared in your app dependencies.Thank you for your comments and I’m glad you finally managed to make everything working! 💪