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

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


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?



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.



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



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.


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, '/'); });

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.


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