I am building nextjs application with Metronic 9 Tailwind version v9.1.2, and used the nextjs seed project from github: metronic-tailwind-next, but 'npm run build' throwing following error.
whereas it was fine in the Metronic 9 tailwind v9.0.6. This started happening after migrating to the v9.1.2.
Using NextJs v15.0.3.
/frontend>npm run build
> partner-center-ui@0.1.0 build
> next build
â–² Next.js 15.0.3
Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types .Failed to compile.
./src/metronic/core/index.ts:79:3
Type error: Subsequent property declarations must have the same type. Property "KTUtils" must be of type "{ geUID(prefix?: string): string; getBreakpoint(breakpoint: KTBreakpointType): number; getCssVar(variable: string): string; parseDataAttribute(value: string): KTOptionType; ... 7 more ...; checksum(value: string): string; }", but here has type "{ geUID(prefix?: string): string; getBreakpoint(breakpoint: KTBreakpointType): number; getCssVar(variable: string): string; parseDataAttribute(value: string): KTOptionType; ... 8 more ...; checksum(value: string): string; }".
77 | declare global {
78 | interface Window {
> 79 | KTUtils: typeof KTUtils;
| ^
80 | KTDom: typeof KTDom;
81 | KTEventHandler: typeof KTEventHandler;
82 | KTMenu: typeof KTMenu;
Hi Qamer,
Have you updated the /src/helpers/utils.ts file with the latest version? Based on the error, it seems the KTUtils functions inside this file have different declarations.
Thanks
I have copied the following new version complete directory into my project by replacing the old metronic version:
metronic-v9.1.2\metronic-tailwind-html\src
This has been resolved after moving metronic's old version renamed folder outside the project. Thanks for your quick input.
Hi ,
Great! All the best with your projects!
Regards,
Sean