Solvedangular cli ProgressPlugin breaks with webpack 4.25.* due to incorrect option colors

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [*] build
- [*] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Repro steps

npm install
npm run build / serve

The log given by the failure

Progress Plugin Invalid Options

options['colors'] is an invalid additional property
options should pass "instanceof" keyword validation
options should match exactly one schema in oneOf

ValidationError: Progress Plugin Invalid Options

options['colors'] is an invalid additional property
options should pass "instanceof" keyword validation
options should match exactly one schema in oneOf

Desired functionality

In common.ts#L147 the ProgressPlugin is called with parameter colors. This does not meet the schema which is validated ProgressPlugin.js#L90

Mention any other details that might be useful

40 Answers

✔️Accepted Answer

Can be fixed temporarily by adding this line to package.json

"devDependencies":{
...
"webpack": "4.24.0"
}

then
npm install

Other Answers:

I had the same issue on Ubuntu 18.10, Node 10.8.0, NPM 6.2.0 and Angular CLI 6.2.6.

Fixed it with removing colors option on this file:
/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/common.js
on Line: 123

Changed this:
extraPlugins.push(new ProgressPlugin({ profile: buildOptions.verbose, colors: true }));
to:
extraPlugins.push(new ProgressPlugin({ profile: buildOptions.verbose }));

Hope this help. Cheers.

ng update --all did the work!

update from

    "@angular-devkit/build-angular": "0.8.4",

to

    "@angular-devkit/build-angular": "0.11.0",

Can be fixed temporarily by adding this line to package.json

"devDependencies":{
...
"webpack": "4.24.0"
}

then
npm install

Worked for me! Thanks.
Deleted node_modules, then ran npm cache clean --force && npm install && npm install --open --prod

More Issues: