gluestack / gluestack-ui

React & React Native Components & Patterns (import from library & copy-paste styles all the way to victory)
https://gluestack.io/
MIT License
1.84k stars 92 forks source link

Facing issue after upgrading project to expo 49 #1615

Open Gluant101 opened 6 months ago

Gluant101 commented 6 months ago

Description

Error: While trying to resolve module clsx from file

CodeSandbox/Snack link

No response

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

gluestack-ui Version

3.3.1

Platform

Other Platform

No response

Additional Information

Issue: https://discord.com/channels/1050761204852858900/1192419797225443338

neverson-silva commented 5 months ago

having same issue some update on this? any components more complex that needs some kind of anymation this error occurs.

n1thun commented 5 months ago

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.

image

diatche commented 4 months ago

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'],
  },