Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic 9 Tailwind version v9.1.2 is throwing error on npm run build after upgrade from 9.0.6


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;


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


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

If i try to fix the KTUtils by removing the new extra method camelReverseCase, then the error comes again in the next file KTDom.

Not sure why this mismatch is happening. Although npm run dev works fine.


This has been resolved after moving metronic's old version renamed folder outside the project. Thanks for your quick input.



Hi happy,

Great! All the best with your projects!

Regards,
Sean


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(