-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
@pigment-css incompatibility problem #49
Comments
Probably a bundling problem or some webpack or similar issue... |
@adrai what if I want to use I'm trying
instead of standard and working
but it doesn't work for me. |
Oh, sorry, that should be quetion to 'next-i18next' author :) |
Not really, maybe next.js |
@adrai so just likes #48 mentions the issue is in file fs.js:
Once I comment this line my build stops failing. And if I remove pigment-css wrapper (withPigment) and any mention of it everything still works. My demo app is plain next.js app without any webpack changes/additions. |
Do you use turbo? |
Nope. No config changes to defaults at all. |
I just cloned your repo and fixed the next.config.js to correctly use with Pigment... rkurbatov/acq-test#1 and I do not see any error... |
Try uncommenting this code - https://github.com/rkurbatov/acq-test/blob/master/pages/_error.tsx while you serve it and go to any absent page (like localhost:3000/aaa). I forgot to enable withPigment in my repo. It will fail with the error I mentioned. If you uncomment it while it's not running and then run serve - it will just hang. If you comment out the Pigment uses wyw-in-js transformation and it doesn't work on that package for some reason. |
please update next-i18next and retry |
YAY! Thanks, that works now! |
This problem looks quite indirect and probably @pigment-css is the source of it, but I just found very similar issue:
#48 that was closed due to impossibility to reproduce it.
https://github.com/rkurbatov/acq-test - here is my minimal application that reproduces the issue. It's NextJS app that uses next-i18next for localization. That works until I try to switch from @emotion to @pigment-css library.
Once I try to import
css
function in any of the components on any NextJS page I have this error:Seems like something is really odd with the way the package exports functions. NextJS is known for lots of problems with imports and modules, juggling them in multiple ways so finally something happens breaking our app.
I opened similar bug reports in both pigment and next-i18next repos but probably I can get some help here as well.
mui/pigment-css#115
i18next/next-i18next#2288
The text was updated successfully, but these errors were encountered: