mantine-datatable
mantine-datatable copied to clipboard
styles breaks next middleware / next-intl locale
Describe the bug
Upon importing mantine-datatable/styles.css
, or the layers alternative, I get the following error, while using next-intl
:
✓ Compiled in 1082ms (3375 modules)
locale: en
locale: _next
⨯ node_modules\next-intl\dist\esm\server\RequestLocale.js (1:609) @ eval
⨯ Error: Unable to find `next-intl` locale because the middleware didn't run on this request. See https://next-intl-docs.vercel.app/docs/routing/middleware#unable-to-find-locale
at stringify (<anonymous>)
null
⨯ node_modules\next-intl\dist\esm\server\RequestLocale.js (1:609) @ eval
⨯ Error: Unable to find `next-intl` locale because the middleware didn't run on this request. See https://next-intl-docs.vercel.app/docs/routing/middleware#unable-to-find-locale
at stringify (<anonymous>)
digest: "2059184074"
To Reproduce Steps to reproduce the behavior:
- Install next-intl@latest (v3+) and use
createMiddleware
to setup it's middleware. - import
mantine-datatable/styles.css
- Observe errors
Expected behavior No errors.
I suppose I should be looking in to next-intl as well, to submit a report there, but... it's just odd to me, because this is the only package which causes the error. I import styles from mantine and other libraries without any issues.
removing line 786 of styles.css resolved it for me.
/*# sourceMappingURL=styles.css.map */
so, as far as I can tell, this sourceMapping is causing some sort of issue with next middleware. I tried importing it from both server and client components as well as a different project and it was all the same result; the error message posted above.