-
Notifications
You must be signed in to change notification settings - Fork 164
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
[bug]: TypeError: Cannot read properties of undefined (reading 'withConfig') in nextjs 13 #1174
Comments
What version of |
v5.3.11 |
Are you using a monorepo setup? It looks like nextjs can't find the dependency, imho your problem is with nextjs, not the DS EDIT: have you seen this guide? styled-components/styled-components-website#927 |
No monorepo just a single next.js project. Step 1 and 3 in the guide are complete, not step 2 though. |
Downgraded styled-components back to v5.3.11, no conflicts now, no new errors but the original error is still present. |
It's probably because styled-components v5 is not compatible with the We'll be upgrading to styled-components v6 at some point this year now it's been released. |
Ok, so your saying Strapi Design System is not currently compatible with next.js 13? |
No, im saying the design system is using styled-components 5 which from your issue seems to have issues with nextjs RSCs. |
Ok, I will check out the next.js & styled-component forums to see if there is a workaround. Otherwise I will have to downgrade to next.js v12. |
Thanks for the fast help anyway! |
What version of strapi-design-system are you using?
What's Wrong?
I am unable to build a Nextjs production version of my application because of this error but everything works as expected in dev mode even though the error is logged there too. The error seems to originate from the Box component only.
Dev error
Production error
To Reproduce
Run Nextjs in dev mode or perform a production build. Building can never complete because of this error.
Expected Behaviour
No error and building can complete successfully.
The text was updated successfully, but these errors were encountered: