[WEB] ReferenceError: setImmediate is not defined #712
Labels
🎯 crash
Library triggers a crash of the app
repro provided
Issue contains reproduction repository/code
🌐 web
Web specific
Describe the bug
I get an error when I use react-native-keyboard-controller on the web. When i open website: If I use it in another page and not in the page that is open, then I can use it when I go to the page where I use react-native-keyboard-controller. But if I reload the tab in those pages that I use react-native-keyboard-controller or the first page uses react-native-keyboard-controller, then it will not have time to initialize somehow and gives an error:
ReferenceError: setImmediate is not defined
I USED
npx expo export -p web
THENnpx serve dist --single
(same in the prod)Code snippet
In my case i use KeyboardAwareScrollView
Repo for reproducing
https://github.com/devoren/rnkc-web-bug
To Reproduce
Steps to reproduce the behavior:
npx expo export -p web && npx serve dist --single
)Expected behavior
Reload without any issues
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
This only happens when I build the expo web app via npx expo export -p web and if I use it in development mode it works without any issues.
As I see, setImmediate is used once in the codebase:
react-native-keyboard-controller/src/internal.ts
Line 52 in 737e452
I hope that these issues and pulls can help:
software-mansion/react-native-reanimated#4140
software-mansion/react-native-reanimated#4276
The text was updated successfully, but these errors were encountered: