[webpack-cli] Failed to load '/Users/djop/Downloads/themeforest-MCeQ2oV0-metronic-responsive-admin-dashboard-template/asp.net-core/asp.net-core/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 '/Users/djop/Downloads/themeforest-MCeQ2oV0-metronic-responsive-admin-dashboard-template/asp.net-core/asp.net-core/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:///Users/djop/Downloads/themeforest-MCeQ2oV0-metronic-responsive-admin-dashboard-template/asp.net-core/asp.net-core/Starterkit/_keenthemes/tools/webpack.config.js:1:17
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Hi,
Please note, to use Webpack in Metronic template you need to modify <storng>package.json. The default package.json works for Gulp. To make it work for Webpack, you have to modify tools/package.json and remove "type": "module"
.
You can refer to our Asp.Net-Core getting started docs.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Nice support, thank u!
Hi,
Please don't hesitate to reach out if you need anything more from us.
Regards,
Lauris Stepanovs,
Keenthemes Support Team