gluestack / gluestack-ui

React & React Native Components & Patterns (copy-paste components & patterns crafted with Tailwind CSS (NativeWind))
https://gluestack.io/
MIT License
2.72k stars 120 forks source link

The project built with a monorepo includes Next.js and Expo. #2582

Open chenerge opened 1 day ago

chenerge commented 1 day ago

Description

The Next.js startup fails, and the components used by Expo are not styled.

CodeSandbox/Snack link

.

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

https://github.com/chenerge/scud-monorepo.git

chenerge commented 1 day ago

Next.js was working fine initially, but after updating the dependencies, it started throwing errors.

⨯ ../../node_modules/@gluestack-ui/accordion/lib/Accordion.jsx Module parse failed: Unexpected token (22:12) | }; | }, [state, isDisabled, selectedValues]);

return (<AccordionContext.Provider value={contextValue}>

| <StyledAccordion ref={ref} {...props}> | {children}

Import trace for requested module: ../../node_modules/@gluestack-ui/accordion/lib/Accordion.jsx ../../node_modules/@gluestack-ui/accordion/lib/index.jsx ../../packages/components/ui/accordion/index.tsx ../../packages/components/ui/index.ts ../../packages/screens/login/LoginScreen.tsx ./app/page.tsx

Viraj-10 commented 1 day ago

Hey @chenerge, Please use react-native-svg version 13.4.0.

chenerge commented 21 hours ago

嘿,请使用 13.4.0 版本。react-native-svg Hello, I made the modifications and Next.js is running, but Expo still doesn't have the styles.

chenerge commented 20 hours ago

I encountered an error when using toast in Next.js. NativeAnimatedHelper.js:428 Animated: useNativeDriver is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add RCTAnimation module to this app, or remove useNativeDriver. Make sure to run bundle exec pod install first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md