Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with expo 51 #2157

Open
1 of 6 tasks
AkermanGreg opened this issue May 14, 2024 · 7 comments
Open
1 of 6 tasks

Issues with expo 51 #2157

AkermanGreg opened this issue May 14, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@AkermanGreg
Copy link

Description

Crashes entire app

CodeSandbox/Snack link

No response

Steps to reproduce

  1. Start a new project with Expo 50 and gluestack
  2. Update to expo 51
  3. Try to load app
  4. 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

  • Expo
  • React Native CLI
  • Next
  • Web
  • Android
  • iOS

Other Platform

No response

Additional Information

No response

@AkermanGreg AkermanGreg added the bug Something isn't working label May 14, 2024
@rajat693
Copy link
Collaborator

please share more information this is not enough, to debug the issue

@nathan-charles
Copy link

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

@ankit-tailor
Copy link
Collaborator

Hey @nathan-charles, Thanks for reporting the issue. We'll fix it.

@ankit-tailor
Copy link
Collaborator

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.

@nelson-martins
Copy link

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,

@nelson-martins
Copy link

And now I realize that even in the android simulator the error persists.
It reappears somehow randomly...

@nelson-martins
Copy link

Hi @AkermanGreg, have you managed to solve this issue?

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants