Hi
I just bought Metronic theme and trying to run with Blazor as per given instructions but getting error as below while running "npm run build" command:
Failed to load 'D:\Celestia\MetronicBlazor\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:\Celestia\MetronicBlazor\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:/Celestia/MetronicBlazor/Starterkit/_keenthemes/tools/webpack.config.js:1:17
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Can you please help in this regard ?
Thank you
Hi Sultan Mehmood,
Thank you for reaching out to us.
As described in our documentation to use Webpack you need to remove "type": "module"
from _keenthemes/tools/package.json. You can refer to our Getting Started doc page.
Regards,
Lauris Stepanovs,
Keenthemes Support Team