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

Error after changing Namespace | Metronic 8 Blazor


Good Day everybody,

I am currently using Metronic 8 for Blazor. I started with the "Starterkit" and after some research I changed the "Startkit" Namespace to "MyProject" with a Global Search and replace.

When I try to start up the project now, I get some weird errors. Anybody able to help me out?

This is the error message:

Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'IThCtsT4qnLGYm4KFR1WOP_mHZQnUFtKgoqiufnT8oM'.
Microsoft.JSInterop.JSException: Could not find 'KTCardsWidget17.init' ('KTCardsWidget17' was undefined).
Error: Could not find 'KTCardsWidget17.init' ('KTCardsWidget17' was undefined).


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)


i also having same error and i did'ny change the namespace or any kind of changing in the code and facing exactly same error



Oh and BTW. Yes I did build the Assets Folder. It's located under wwwRoot. Everything worked perfectly fine before changing Namespace.

Thanks



Hi,

Sorry for the delay in reply.

This issue doesn't seem to be related to the project namespace. Unfortunately, we were not able to reproduce this error, if besides global replacement you have renamed the folder name and .csproj file, then everything should work fine.

Could you please specify which building tools are you using?
Gulp/Webpack

Also, if you have modified anything else in our code please describe those changes.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


I got same error. here are my steps:

  1. download the zip. and extract to (Win11) ...metronic_blazor_v8.2.9\Starterkit_keenthemes\tools
  2. open cmd.exe in administrator mode. try yarn -install and gulp
  3. go to ...metronic_blazor_v8.2.9\Starterkit and try dotnet watch. get this error

dotnet watch 🚀 Started info: Microsoft.Hosting.Lifetime[14] Now listening on: http://localhost:5265 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Development info: Microsoft.Hosting.Lifetime[0] Content root path: C:\Users\fn7281\source\repos\metronic_blazor_v8.2.9\Starterkit warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3] Failed to determine the https port for redirect. warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100] Unhandled exception rendering component: Could not find 'KTCardsWidget17.init' ('KTCardsWidget17' was undefined). Error: Could not find 'KTCardsWidget17.init' ('KTCardsWidget17' was undefined). at http://localhost:5265/_framework/blazor.web.js:1:537 at Array.forEach () at l.findFunction (http://localhost:5265/_framework/blazor.web.js:1:505) at b (http://localhost:5265/_framework/blazor.web.js:1:5248) at http://localhost:5265/_framework/blazor.web.js:1:3041 at new Promise ()

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  :(