Christmas Sale! Limited Time Only - Enjoy 30% Off Metronic Extended License!
Buy for 669$  969$

blazor doesn´t work


I'm getting this message, could you please help me

$ npm run build

> keenthemes@1.0.0 build
> webpack

[webpack-cli] Failed to load 'D:\Dev\metronicnet\blazon\blazor_demo1\Starterkit\_keenthemes\tools\webpack.config.js' config
[webpack-cli] ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and 'D:\Dev\metronicnet\blazon\blazor_demo1\Starterkit\_keenthemes\tools\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at file:///D:/Dev/metronicnet/blazon/blazor_demo1/Starterkit/_keenthemes/tools/webpack.config.js:1:17
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:429:15)
at async WebpackCLI.tryRequireThenImport (D:\Dev\metronicnet\blazon\blazor_demo1\Starterkit\_keenthemes\tools\node_modules\webpack-cli\lib\webpack-cli.js:232:34)
at async loadConfigByPath (D:\Dev\metronicnet\blazon\blazor_demo1\Starterkit\_keenthemes\tools\node_modules\webpack-cli\lib\webpack-cli.js:1406:27)
at async WebpackCLI.loadConfig (D:\Dev\metronicnet\blazon\blazor_demo1\Starterkit\_keenthemes\tools\node_modules\webpack-cli\lib\webpack-cli.js:1515:38)
at async WebpackCLI.createCompiler (D:\Dev\metronicnet\blazon\blazor_demo1\Starterkit\_keenthemes\tools\node_modules\webpack-cli\lib\webpack-cli.js:1781:22)
at async WebpackCLI.runWebpack (D:\Dev\metronicnet\blazon\blazor_demo1\Starterkit\_keenthemes\tools\node_modules\webpack-cli\lib\webpack-cli.js:1877:20)
at async Command.<anonymous> (D:\Dev\metronicnet\blazon\blazor_demo1\Starterkit\_keenthemes\tools\node_modules\webpack-cli\lib\webpack-cli.js:944:21)


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 (1)


Hi,

Thank you for reaching out to us.

Have you tried to remove this part from tools/package.json?


"type": "module",


Regards,
Lauris Stepanovs,
Keenthemes Support Team


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