Running ng build on my Angular 4 project give this error :
ng build
14% building modules 40/46 modules 6 active ...es\\@angular\\http\\@angular\\htt
Do npm ls webpack
npm ls webpack
If you see two versions of webpack (under @angular/cli and the root node_modules), Then that is the problem. Delete/Rename the webpack under @angular/cli and in the .bin folder of @angular/cli.
webpack
@angular/cli
.bin
Problem solved for me