Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. configuration[0].entry['js/widgets.bundle']


Hi, how are you?

I have the new version of metronic_asp.net-core_v8.2.1

I did the step by step:

- npm install
- npm run build --demo1

but when I'm running npm run build --demo1 I'm getting the following error:

> keenthemes@8.2.1 build
> webpack

[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration[0].entry['js/widgets.bundle'] should be a non-empty array.
-> All modules are loaded upon startup. The last one is exported.

Would you be able to help, please.


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


Hi,

I apologize for the inconvenience you've experienced. To address this, we have made a silent update to the zip file, and all critical issues have been resolved. Please try redownloading the package using the following link:

https://devs.keenthemes.com/metronic/asp.net-core

If you have any further questions or encounter any issues, please don't hesitate to reach out. Your feedback is valuable, and we're here to assist you. Thank you for your understanding.



Hi, I ran the step-by-step instructions https://preview.keenthemes.com/asp.net-core/metronic/docs/getting-started again and it still gives me an error:

> keenthemes@8.2.1 build
>webpack

[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration[0].entry['js/widgets.bundle'] should be a non-empty array.
-> All modules are loaded upon startup. The last one is exported.

I was looking and found this call with the same problem:

https://devs.keenthemes.com/question/configuration0entryjswidgetsbundle-should-be-a-non-empty-array-1

1. Visit this link: https://gist.github.com/KeenthemesHub/9bb8c1cb3e111adca7bd6df1b4272e20#file-webpack-config-js-L114-L116
2. In the `webpack.config.js` file, find lines 114 to 116.
3. Replace these lines with the content provided in the link.


// Widgets js
entries['js/widgets.bundle'] = (glob.sync(path.relative('./', srcPath).replaceAll(/\\/g, '/') + '/js/widgets/**/!(_)*.js') || []).map(file => {
return file.replaceAll(/\\/g, '/');
});



Does the solution provided in the link work for you? This issue appears to be related to Windows, and we are working on fixing it. If you encounter any further issues or have additional questions, please feel free to ask for assistance.



Yes, it works if you change this line in the "webpack.config.js" file:

before:
// js widgets
entries['js/widgets.bundle'] = (glob.sync(path.relative('./', srcPath) + '/js/widgets/**/!(_)*.js') || [] );

after:
// widget js inputs
['js/widgets.bundle'] = (glob.sync(path.relative('./', srcPath).replaceAll(/\\/g, '/') + '/js/widgets /**/! (_)*.js') || []).map(file => {
return file.replaceAll(/\\/g, '/');
});


I just don't understand why it doesn't play the "custom" folder "wwwroot\assets\js\custom", I don't have to do that...

NOTE: I'm doing this on Windows using the commands "npm install" and "npm run build --demo1" which is available at "https://preview.keenthemes.com/asp.net-core/metronic/docs/getting- started"

Thanks for your help and if you can fix this problem on serial windows that would be great.



Thank you for providing feedback and sharing the workaround for the webpack configuration on Windows. We appreciate for your input.

We will include the adjustments to ensure compatibility with Windows environments by default.

If you have any further questions or encounter additional issues, please don't hesitate to reach out.

Thanks



"Hello, I have another question:

After run "npm run build --demo1" the "js\custom" folder is not created in "wwwroot\assets".

Would you be able to help, please?"



Hi,

Just wanted to let you know that as of v8.2.2 this is still an issue and only after following instructions provided by Ramsés França it will work. It will be good if you could fix the issue, so just following the instructions provided in https://preview.keenthemes.com/asp.net-core/metronic/docs/getting-started it will simply work.

Thanks



Greetings,

Your .net core integration is a torture. we get a separate error at each step.

I'm getting this error:

- configuration[0].entry['js/widgets.bundle'] should be a non-empty array.

I tried the solutions above but still the same.

I am trying with widows 11. with npm run build --demo1.

Thanks for your help.



Mobil and Hayk as well, I think they solved the problem, I downloaded the version metronic_asp.net-core_v8.2.4 and here it was.... could you also test it please?


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