Open resticker opened 3 months ago
Hi @resticker ,
Thank you for reporting the issue. I created a new Expo project, initialized gluestack-ui, and ran it on the web. I didn’t encounter the warnings you’re seeing. You can check out the repository here: expo-gluestack-v2-setup.
The issue might be related to cyclic imports that could have occurred inadvertently. For further details on circular dependencies and how to handle them, you might find this Stack Overflow link helpful.
If you continue to experience issues or have any additional questions, please let us know, and We’ll be happy to assist!
@rajat693 it looks like you didn't use yarn
I have the same problem as @resticker. Following the instructions in docs I installed expo -> nativewind -> gluestack v2. Thank you @rajat693 for posting your setup. I was looking for differences and I found a way to break your repo (setup).
Add dependencies to package.json
"react-native-safe-area-context": "4.10.5",
"expo-router": "~3.5.23",
"expo-linking": "~6.3.1",
Enable static rendering in app.json
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/favicon.png"
}
Add these two file
/app/index.tsx
import React from 'react';
import { Text, View } from 'react-native';
export default function Index() {
return (
<View
style={{
flex: 1,
justifyContent: "center",
alignItems: "center",
}}>
<Text>Edit app/index.tsx to edit this screen.</Text>
</View>
);
}
/app/_layout.tsx
import React from 'react';
import { Stack } from 'expo-router';
import { GluestackUIProvider } from '@/components/ui/gluestack-ui-provider';
// Import your global CSS file
import "../global.css"
export default function RootLayout() {
return (
<GluestackUIProvider>
<Stack>
<Stack.Screen name="index" />
</Stack>
</GluestackUIProvider>
);
}
I don't know what we're doing wrong, I'll be happy for any advice
Description
Getting many "Require cycles are allowed but..." errors when running Expo project on web
CodeSandbox/Snack link
https://github.com/resticker/gluetest1
Steps to reproduce
git clone https://github.com/resticker/gluetest1
yarn
to install dependencies (I'm using Yarn v1.22.19)yarn web
gluestack-ui Version
v2 (not sure which package version goes here)
Platform
Other Platform
No response
Additional Information
To create this project, all I did was:
yarn create expo-app
npx gluestack-ui init
yarn web
Expo version: 51.0.24 Yarn version: 1.22.19
Maybe related to: https://github.com/adobe/react-spectrum/issues/6394
Warnings look like: