Skip to content

Failed to resolve import "mantine-react-table/locales/fr" #390

Open

Description

@Leo-Schmit

mantine-react-table version

2.0.0-beta.6

react & react-dom versions

18.3.1

Describe the bug and the steps to reproduce it

https://v2.mantine-react-table.com/docs/guides/localization#localization-(i18n)-guide
Click "open code sandbox"

Minimal, Reproducible Example - (Optional, but Recommended)

https://codesandbox.io/p/devbox/github/KevinVandy/mantine-react-table/tree/v2/apps/mantine-react-table-docs/examples/localization-i18n-fr/sandbox?file=%2Fsrc%2FTS.tsx

Screenshots or Videos (Optional)

image

Do you intend to try to help solve this bug with your own PR?

None

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Activity

  1. added
    bug
    on Aug 13, 2024
  2. JulioGiovanni commented on Aug 26, 2024

    @JulioGiovanni

    I have the same issue but with the ES localization
    CleanShot 2024-08-26 at 17 31 35@2x

  3. alessandrojcm commented on Aug 27, 2024

    @alessandrojcm
    Collaborator

    Hey sorry for the late reply, we need to look into this as it has it keeps popping up. It has been very difficult to get the bundler to play nice with these files. One (very ugly) workaround can be to copy the contents of the localization file to your project (is just a plain JS object) and use that in the meantime.

  4. oskarcronwall commented on Sep 13, 2024

    @oskarcronwall

    I got the same kind of error when importing locale files. I mananged to work around it by changing
    import { MRT_Localization_SV } from "mantine-react-table/locales/sv";
    to
    import { MRT_Localization_SV } from "mantine-react-table/locales/sv/index.cjs";

  5. alessandrojcm commented on Nov 4, 2024

    @alessandrojcm
    Collaborator

    I got the same kind of error when importing locale files. I mananged to work around it by changing import { MRT_Localization_SV } from "mantine-react-table/locales/sv"; to import { MRT_Localization_SV } from "mantine-react-table/locales/sv/index.cjs";

    Is your project using ESM?

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions