When I run ng build --prod get this error. It can serve without error but it can't build. I relay tied with that
ERROR in Module build failed (from ./node_modules/@angular-devkit/build-angular/node_modules/mini-css-extract-plugin/dist/loader.js):
TypeError: Cannot read property 'replace' of undefined
at normalizeBackSlashDirection (C:\project\tea supply chain mangement system\test2\node_modules\webpack\lib\RequestShortener.js:16:17)
at new RequestShortener (C:\project\tea supply chain mangement system\test2\node_modules\webpack\lib\RequestShortener.js:26:15)
at new Compiler (C:\project\tea supply chain mangement system\test2\node_modules\webpack\lib\Compiler.js:195:27)
at Compiler.createChildCompiler (C:\project\tea supply chain mangement system\test2\node_modules\webpack\lib\Compiler.js:548:25)
at Compilation.createChildCompiler (C:\project\tea supply chain mangement system\test2\node_modules\webpack\lib\Compilation.js:2100:24)
at Object.pitch (C:\project\tea supply chain mangement system\test2\node_modules\@angular-devkit\build-angular\node_modules\mini-css-extract-plugin\dist\loader.js:89:43)
My dependencies:
"dependencies": {
"@agm/core": "^1.1.0",
"@angular/animations": "8.2.14",
"@angular/cdk": "^8.2.3",
"@angular/common": "8.2.14",
"@angular/compiler": "8.2.14",
"@angular/core": "^8.2.14",
"@angular/http": "^7.2.15",
"@angular/material": "^8.2.3",
"@angular/router": "8.2.14",
....
"web3": "^1.2.4",
"zone.js": "0.9.1"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^8.4.1",
"@angular-builders/dev-server": "^7.3.1",
"@angular-devkit/build-angular": "^0.803.21",
"@angular-devkit/architect": "^0.803.21",
"@angular/cli": "^8.3.21",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "8.2.14",
.....
}
How to solve this error?