gluestack-ui
gluestack-ui copied to clipboard
Facing issue after upgrading project to expo 49
Description
Error: While trying to resolve module clsx from file
CodeSandbox/Snack link
No response
Steps to reproduce
- Go to '...'
- Click on '...'
- Scroll down to '...'
- See error
gluestack-ui Version
3.3.1
Platform
- [ ] Expo
- [ ] React Native CLI
- [ ] Next
- [ ] Web
- [ ] Android
- [ ] iOS
Other Platform
No response
Additional Information
Issue: https://discord.com/channels/1050761204852858900/1192419797225443338
having same issue some update on this? any components more complex that needs some kind of anymation this error occurs.
Posting the original issue from discord over here for ease of access. I too have the same issue, the web build fails to render after adding gluestack-ui. I am able to run the ios simulator though.
Our app is an Expo 49 app (native and web) in an Nx monorepo. We had the same issue where the web build would fail with:
Unable to resolve "clsx" from "../../node_modules/@react-aria/utils/dist/module.js"
Going to metro.config.js and adding mjs to sourceExts fixed the issue (cjs and svg was previously added for other reasons and may be needed for this as well):
resolver: {
// other configs...
sourceExts: [...sourceExts, 'svg', 'mjs', 'cjs'],
},
Hi there! To help us better understand and resolve your issue, could you please provide a minimal codebase that reproduces the problem? This will greatly assist us in diagnosing and fixing the issue more efficiently. Thank you so much for your cooperation!
Hey there, we are closing this issue for now, please feel free to reopen the issue if you are still facing it/ having any queries about it.