DocSpring / craco-antd

A craco plugin to use Ant Design with create-react-app
MIT License
234 stars 49 forks source link

Couldn't migrate antd 3.x to 4.x [Craco + Typescript Project] #45

Closed VigneshPT closed 2 years ago

VigneshPT commented 4 years ago

Project worked fine with antd version 3.26.18 and craco-antd 1.11.0.

Followed the migration guide by Antd to upgrade antd to 4.5.3 but got the following error when trying to compile.

/Users/xxx/node_modules/@ant-design/icons/lib/components/Icon.d.ts(19,78):
TS2344: Type '"max" | "required" | "low" | "high" | "disabled" | "default" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | ... 345 more ... | "wmode"' does not satisfy the constraint '"max" | "required" | "low" | "high" | "disabled" | "default" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | ... 345 more ... | "wmode"'.
  Type '"translate"' is not assignable to type '"max" | "required" | "low" | "high" | "disabled" | "default" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | ... 345 more ... | "wmode"'.

I suspected issue with @types/react: 16.8.20, but not sure if that's the problem.

kamronbatman commented 2 years ago

Should be working now.