I am using the design system for my next project. Whenever I try to use the individual component it throws an error of Internal error: TypeError: defPropValFN is not a function
.
A comprehensive error message is also included. The storybook docs are not helping either. Any help to solve this would be appreciated.
This topic has been created from a Discord post (1217121285251792987) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord
Hi <@930033702858293258>. I had the same problem and fixed it.
What version of styled-components do you have in your project ? Strapi is not compatible with style-components >= v6
1 Like
Hello <@582486543621423105>
I noticed the issue was with the version of styled-components in my project. I had to use v5 and it fixed the issue here. Thanks for your inputđź‘Ť
I am using strapi 5.0.1 and styled-components > 6 and still have this issue
haved tried 6.0.0 and ^6.1.13, but neither work, anything below 6 and strapi 5 wont even start though
TypeError: defPropValFN is not a function
at shouldForwardProp (http://localhost:1337/node_modules/.strapi/vite/deps/@strapi_design-system.js?v=047f4a83:10892:72)
at w2 (http://localhost:1337/node_modules/.strapi/vite/deps/chunk-NVWCXVNL.js?v=cfe8cc73:1240:16)
at http://localhost:1337/node_modules/.strapi/vite/deps/chunk-NVWCXVNL.js?v=cfe8cc73:1259:155
at O2 (http://localhost:1337/node_modules/.strapi/vite/deps/chunk-NVWCXVNL.js?v=cfe8cc73:1267:6)
at renderWithHooks (http://localhost:1337/node_modules/.strapi/vite/deps/chunk-IYHTQODQ.js?v=cfe8cc73:11568:26)
at updateForwardRef (http://localhost:1337/node_modules/.strapi/vite/deps/chunk-IYHTQODQ.js?v=cfe8cc73:14345:28)
at beginWork (http://localhost:1337/node_modules/.strapi/vite/deps/chunk-IYHTQODQ.js?v=cfe8cc73:15966:22)
at beginWork$1 (http://localhost:1337/node_modules/.strapi/vite/deps/chunk-IYHTQODQ.js?v=cfe8cc73:19781:22)
at performUnitOfWork (http://localhost:1337/node_modules/.strapi/vite/deps/chunk-IYHTQODQ.js?v=cfe8cc73:19226:20)
at workLoopSync (http://localhost:1337/node_modules/.strapi/vite/deps/chunk-IYHTQODQ.js?v=cfe8cc73:19165:13)
had to switch design system version manually because its not released yet it seems.
“@strapi/design-system”: “2.0.0-rc.11”,
“@strapi/icons”: “2.0.0-rc.11”,