Skip to content

Dynamic fonts added on v7.9.0+ causes bundling for Expo Web with Metro and react-native-web to break #2788

Closed
@brianangulo

Description

@brianangulo

Description

After v7.9.0 and when not using Dynamic Fonts at all when building a react native app for web using Expo, Metro, and react-native-web I encounter a bundling error where the bundler is unable to resolve PermissonsAndroid. Please refer to the screenshot found in the sections below. Downgrading to v7.8.0 resolves the issue.

Related to

  • Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

Easiest way to repro:

  1. Scaffold an expo-router project using a template: npx create-expo-app@latest --template tabs@49
  2. Install react-native-ui-lib: npm i react-native-ui-lib
  3. Replace any component with a ui lib component:
// import { View } from 'react-native'; // comment this out
import { View } from 'react-native-ui-lib';
  1. Bundle for web: npx expo start --web
  2. See error

Expected behavior

It should bundle for web without any issues in projects where Dynamic fonts are not being used

Actual behavior

Fails to bundle for web

More Info

Code snippet

// import { View } from 'react-native'; // comment this out
import { View } from 'react-native-ui-lib';

Screenshots/Video

Screenshot 2023-10-31 at 1 35 17 PM

Environment

v7.9.0+ failures 🔴
v7.8.0 works ✅

  • react-native-web: ~v0.19.6
  • React Native version: v0.72.6
  • React Native UI Lib version: v7.9.1

Affected platforms

  • Android
  • iOS
  • Web

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in one of the components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions