expo / router

[ARCHIVE]: Expo Router has moved to expo/expo -- The File-based router for universal React Native apps
https://docs.expo.dev/routing/introduction/
1.36k stars 113 forks source link

Metro has encountered an error: While trying to resolve module `stylis` #854

Closed hyochan closed 1 year ago

hyochan commented 1 year ago

Which package manager are you using? (Yarn is recommended)

yarn

Summary

Originally posted related issue in https://github.com/expo/expo/issues/23412.

I am facing below error after installing emotion from expo-router-49 template.

Screenshot 2023-08-23 at 10 27 26 AM

Related Issue

I also posted issue in https://github.com/emotion-js/emotion/issues/3073 and doubt that this happens in expo-router 🤔

Minimal reproducible example

I created a small repo in commit after Generated by create-expo-app 2.0.3. in https://github.com/hyochan/expo-router-49-stylis-error-reproduction.

marklawlor commented 1 year ago

Fix in Expo Router 2.0.1 (your repo is using 2.0.0)

From the linked issue https://github.com/expo/expo/issues/23412#issuecomment-1650882142

hyochan commented 1 year ago

@marklawlor I am sorry but upgrading expo-router to 2.0.1 and it is still the same in https://github.com/hyochan/expo-router-49-stylis-error-reproduction.

I'm currently using version 2.0.1 of expo-router in another project. I mistakenly initialized a new expo project with the expo-router template, which defaults to 2.0.0, to create a reproducible example.

What I want to convey is that I was using version 2.0.1 in the original project and encountered the same error there. I also upgraded the newly created reproducible project to 2.0.1 and it's showing the same error.

I would appreciate it if you could check this. I'm really struggling with this issue right now.