angular-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

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 26
  • Comments: 39 (3 by maintainers)

Commits related to this issue

Most upvoted comments

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

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

then npm install

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

make ng update

Another workaround is ng serve --progress=false until you can update angular-cli

@angular/cli@6.2.7 alone didn’t make it, had to upgrade one more:

    "@angular-devkit/build-angular": "0.10.6",
    "@angular/cli": "6.2.7",

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.

Its works! Thanks!

Having same issue while fresh npm install.

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

at validateOptions (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/schema-utils/src/validateOptions.js:31:11)
at new ProgressPlugin (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/webpack/lib/ProgressPlugin.js:90:3)
at Object.getCommonConfig (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/common.js:123:27)
at BrowserBuilder.buildWebpackConfig (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/src/browser/index.js:74:31)
at MergeMapSubscriber.rxjs_1.of.pipe.operators_1.concatMap [as project] (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/src/browser/index.js:31:38)
at MergeMapSubscriber._tryNext (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/mergeMap.js:65:27)
at MergeMapSubscriber._next (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/mergeMap.js:55:18)
at MergeMapSubscriber.Subscriber.next (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/Subscriber.js:64:18)
at TapSubscriber._next (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/tap.js:62:26)
at TapSubscriber.Subscriber.next (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/Subscriber.js:64:18)
at MergeMapSubscriber.notifyNext (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/mergeMap.js:84:26)
at InnerSubscriber._next (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/InnerSubscriber.js:25:21)
at InnerSubscriber.Subscriber.next (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/Subscriber.js:64:18)
at ForkJoinSubscriber.notifyComplete (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/observable/forkJoin.js:79:25)
at InnerSubscriber._complete (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/InnerSubscriber.js:32:21)
at InnerSubscriber.Subscriber.complete (/media/shabbir/Projects/SVN/production/hub/trunk/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/Subscriber.js:76:18)

I am facing same issue. None of the above solutions working for me . Any other suggestions ?

I have the same issue but only in Ubuntu 16.04. On Windows 10 it works just fine. Using Node 8.x

Having the same issue when a making fresh project. Edit: On a Windows 10 laptop

Repro steps

ng new [project-name] npm install && ng serve --open --prod

Expected result

Should open new window with fresh project opened

Result

λ ng serve -o
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

    at validateOptions (..\project-name\node_modules\schema-utils\src\validateOptions.js:31:11)
    at new ProgressPlugin (..\project-name\node_modules\webpack\lib\ProgressPlugin.js:90:3)
    at Object.getCommonConfig (..\project-name\node_modules\@angular-devkit\build-angular\src\angular-cli-files\models\webpack-configs\common.js:123:27)
    at BrowserBuilder.buildWebpackConfig (..\project-name\node_modules\@angular-devkit\build-angular\src\browser\index.js:74:31)
    at DevServerBuilder.buildWebpackConfig (..\project-name\node_modules\@angular-devkit\build-angular\src\dev-server\index.js:111:46)
    at MergeMapSubscriber.check_port_1.checkPort.pipe.operators_1.concatMap [as project] (..\project-name\node_modules\@angular-devkit\build-angular\src\dev-server\index.js:38:40)
    at MergeMapSubscriber._tryNext (..\project-name\node_modules\rxjs\internal\operators\mergeMap.js:65:27)
    at MergeMapSubscriber._next (..\project-name\node_modules\rxjs\internal\operators\mergeMap.js:55:18)
    at MergeMapSubscriber.Subscriber.next (..\project-name\node_modules\rxjs\internal\Subscriber.js:64:18)
    at TapSubscriber._next (..\project-name\node_modules\rxjs\internal\operators\tap.js:62:26)
    at TapSubscriber.Subscriber.next (..\project-name\node_modules\rxjs\internal\Subscriber.js:64:18)
    at MergeMapSubscriber.notifyNext (..\project-name\node_modules\rxjs\internal\operators\mergeMap.js:84:26)
    at InnerSubscriber._next (..\project-name\node_modules\rxjs\internal\InnerSubscriber.js:25:21)
    at InnerSubscriber.Subscriber.next (..\project-name\node_modules\rxjs\internal\Subscriber.js:64:18)
    at ForkJoinSubscriber.notifyComplete (..\project-name\node_modules\rxjs\internal\observable\forkJoin.js:79:25)
    at InnerSubscriber._complete (..\project-name\node_modules\rxjs\internal\InnerSubscriber.js:32:21)

Version

λ ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.2.5
Node: 10.13.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.8.5
@angular-devkit/core         0.8.5
@angular-devkit/schematics   0.8.5
@schematics/angular          0.8.5
@schematics/update           0.8.5
rxjs                         6.2.2
typescript                   2.9.2
λ npm -v
6.4.1