Metro has encountered an error: While trying to resolve module stylis
hyochan opened this issue · comments
Which package manager are you using? (Yarn is recommended)
yarn
Summary
Kindly note, I am raising this concern once more following issue #854. It appears to have been inadvertently closed even though the matter has not been addressed. I've been facing this challenge for over a month now. Your understanding and assistance would be greatly appreciated.
I would like to bring to your attention that the issue still persists in expo-router@^2.0.1 as mentioned in this comment. Additionally, as @marklawlor pointed out in this comment, it remains unresolved. Your guidance on this matter would be deeply appreciated.
Original Context
Summary
Originally posted related issue in expo/expo#23412.
I am facing below error after installing emotion
from expo-router-49 template
.
![Screenshot 2023-08-23 at 10 27 26 AM](https://private-user-images.githubusercontent.com/27461460/262519998-66a83abe-e839-4630-9906-71e0661c4dfe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2Mzk4NzUsIm5iZiI6MTcxOTYzOTU3NSwicGF0aCI6Ii8yNzQ2MTQ2MC8yNjI1MTk5OTgtNjZhODNhYmUtZTgzOS00NjMwLTk5MDYtNzFlMDY2MWM0ZGZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI5VDA1MzkzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk2Y2E5OTU1Y2QyZWQxYjgwZGM1MGVmYzM4MzkyMjEwMzlhNjU3ZWEyMTU3MWIxZTM5OTQwNTM4YTY5OWYwYTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6l_C99jPy8AvdNFTtgoxuDkcoRAsEm2CAguVkaLPNCA)
Related Issue
I also posted issue in emotion-js/emotion#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.
@hyochan Sorry some other fixes were released in @expo/metro-config
. These are available under @expo/metro-config@next
or as a quick fix forcing .mjs
resolution by updating your metro.config.js
with config.resolver.assetExts.push("mjs");
,
@marklawlor Which version of @expo/metro-config is impacted please?
latest
, which is 0.10.x
. The issue was resolved in 0.13.x