Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
Leo-Schmit opened this issue Aug 13, 2024 · 4 comments
Open
1 task done

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

Leo-Schmit opened this issue Aug 13, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Leo-Schmit
Copy link

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.
@alessandrojcm alessandrojcm added the bug Something isn't working label Aug 13, 2024
@JulioGiovanni
Copy link

JulioGiovanni commented Aug 26, 2024

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

@alessandrojcm
Copy link
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.

@oskarcronwall
Copy link

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";

@alessandrojcm
Copy link
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
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants