expo export fails on the web bundle: Unable to resolve module mapbox-gl/dist/mapbox-gl.css
ExpoConfirmed fix
@rnmapbox/maps
Error
Error: Unable to resolve module mapbox-gl/dist/mapbox-gl.css from node_modules/@rnmapbox/maps/lib/module/web/index.jsCause
npx expo export builds every platform in app config, including web. @rnmapbox/maps' web entry imports mapbox-gl CSS, which is not installed in a native-only app.
Fix
Export only the platforms you ship:
shell
npx expo export --platform ios --platform android(or remove web from platforms, or install mapbox-gl if you do ship web).
More Expo errors
- Dev client red screen: No script URL provided (launcher never appears)No script URL provided
- Bundle fails with Invalid expression encountered after supabase-js updateInvalid expression encountered
- After upgrading to SDK 57, expo-font / expo-image / expo-asset config is missing
- SDK upgrade: export dies with SyntaxError after expo install --fixSyntaxError: ... Unable to determine event arguments for "onModeChange"
- expo-doctor wants TypeScript 6 but tsc reports hundreds of errors