Skip to content

From Discord: React Native Incompatibility with fromFileSystem Dynamic Imports in effect/unstable/sql/Migrator #6347

Closed

Description

@effect-bot

Summary

Users reported that in React Native, the 'fromFileSystem' migration loader from the 'effect/unstable/sql/Migrator' module breaks the Metro bundler due to dynamic imports that Metro does not support. Even importing other loaders like 'fromRecord' fails because the entire Migrator module includes 'fromFileSystem', causing build SyntaxErrors. A recommended approach is to avoid importing this Migrator module directly in React Native and instead use the migration loaders provided by '@effect/sql-sqlite-react-native/SqliteMigrator', which do not rely on dynamic imports and are compatible with React Native's Metro bundler. Specifically, 'fromRecord' is suggested as the simplest migration loader to use in React Native environments.

Discord thread

https://discord.com/channels/795981131316985866/1507612572873130075

Activity

  1. goknsh commented on Jun 1, 2026

    @goknsh

    To clarify, the mere existence of fromFileSystem breaks things, I can't import anything from effect/unstable/sql/Migrator. Even doing import { fromRecord } from 'effect/unstable/sql/Migrator' breaks builds with a SyntaxError.

  2. added
    bug
    on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.0bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions