Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack-dev-server- Module build failed

I am getting the error

---Error is below

 ERROR in ./src/main.ts
Module build failed: [object Object]
 @ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
ERROR in ./src/polyfills.ts
Module build failed: [object Object]
 @ multi ./src/polyfills.ts

Below is my webpack.config.js

module.exports = {
    devServer: {
        host: '0.0.0.0',
        disableHostCheck: true
    },
    entry: [
        'webpack-dev-server/client?http://0.0.0.0:4200',
        config.paths.demo
    ]
}

My main.ts and polyfills.ts seem to be all right, I've checked for any errors which there don't seem to be any in those files. My guess is that there is something wrong in my webpack-dev-server.

Does anybody have any suggestions on how to fix this?

like image 272
Meena Mana Avatar asked Sep 10 '26 02:09

Meena Mana


1 Answers

I’ve found a solution by deleting the webpack folder in @ngtools. This solution worked for me.

like image 125
sree Avatar answered Sep 11 '26 17:09

sree