gluestack-ui
gluestack-ui copied to clipboard
Issues with expo 51
Description
Crashes entire app
CodeSandbox/Snack link
No response
Steps to reproduce
- Start a new project with Expo 50 and gluestack
- Update to expo 51
- Try to load app
- See error ERROR Error: You cannot use tokens without wrapping the component with StyledProvider. Please wrap the component with a StyledProvider and pass theme config.
gluestack-ui Version
latest
Platform
- [X] Expo
- [ ] React Native CLI
- [ ] Next
- [ ] Web
- [ ] Android
- [ ] iOS
Other Platform
No response
Additional Information
No response
please share more information this is not enough, to debug the issue
I got this same error with expo 51 using @gluestack-ui/themed when I tried to use @gluestack-style/babel-plugin-styled-resolver plugin. I noticed using certain tags caused the app to crash for example using gap caused a crash then removing it was fine. For now I just removed the babel plugin
Hey @nathan-charles, Thanks for reporting the issue. We'll fix it.
Hey @nathan-charles @AkermanGreg, Babel plugin can't find the config file; it defaults to searching in the project's root directory. Export the Gluestack config from the project's root.
import { config as defaultConfig } from "@gluestack-ui/config";
export const config = defaultConfig;
Let me know if that works.
Hello, we have the same problem and we tried the previous suggestion - it works on the android simulator but not while running it in Expo in a real Android. The error persists.
thanks,
And now I realize that even in the android simulator the error persists. It reappears somehow randomly...
Hi @AkermanGreg, have you managed to solve this issue?
thanks!