Get 2025 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • 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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(