stormy-gold
stormy-gold4w ago

Hi. I created a project using vite, but

Hi. I created a project using vite, but when i try to npm run build I get this error: src/contexts/color-mode/index.tsx:55:13 - error TS2322: Type '{ zIndexPopup?: number | undefined; colorFillContentHover?: string | undefined; colorFillAlter?: string | undefined; colorFillContent?: string | undefined; colorBgContainerDisabled?: string | undefined; ... 480 more ...; colorErrorBgActive: string; }' is not assignable to type 'Partial<ComponentToken> & Partial<AliasToken> & { algorithm?: boolean | MappingAlgorithm | MappingAlgorithm[] | undefined; }'. …
 Type 'import("/Users/bogdanripa/git/refine/client/node_modules/@refinedev/antd/node_modules/antd/es/theme/interface/index").MappingAlgorithm' is not assignable to type 'import("/Users/bogdanripa/git/refine/client/node_modules/antd/es/theme/interface/index").MappingAlgorithm'. Property 'colorErrorBgActive' is missing in type 'import("/Users/bogdanripa/git/refine/client/node_modules/@refinedev/antd/node_modules/antd/es/theme/interface/maps/index").MapToken' but required in type 'import("/Users/bogdanripa/git/refine/client/node_modules/antd/es/theme/interface/maps/index").MapToken'. 55 Affix: { ~ node_modules/antd/es/theme/interface/maps/colors.d.ts:411:5 411 colorErrorBgActive: string; ~~~~~~ 'colorErrorBgActive' is declared here.
1 Reply
fascinating-indigo
fascinating-indigo4w ago
Hey @Bogdan Ripa, here's the related PRs for this error: Due to some errors in antd's bundles we had to pin the antd version to 5.16.5. This issue is now resolved and we've prepared this pr https://github.com/refinedev/refine/pull/5944 to unpin the version. This change will be included to our next release (PR here https://github.com/refinedev/refine/pull/5945). The release will be done by the end of this week. Until the change is released, you can pin down the antd version to 5.16.5 to make sure @refinedev/antd and your project is using the same versions.
npm i --save-exact antd@5.16.5
npm i --save-exact antd@5.16.5