angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open mdasberg opened this issue 8 years ago • 39 comments

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

mdasberg avatar Nov 05 '18 11:11 mdasberg

ng update --all did the work!

works like a charm

eago avatar Nov 05 '18 15:11 eago

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

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

then npm install

doesn't work for me os: OpenSuse Tumbleweed

ng update --all did the work!

but this works fine!

p0larbeer avatar Nov 05 '18 15:11 p0larbeer

Heya, we have a fix incoming in https://github.com/angular/angular-cli/pull/12870. As far as I can tell, this only affects 6.2.x. Neither 6.1.x nor 7.x should be affected.

filipesilva avatar Nov 05 '18 15:11 filipesilva

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.

It works! Thanks a lot :)

guillermosnipe avatar Nov 05 '18 16:11 guillermosnipe

Fixed in https://github.com/angular/angular-cli/releases/tag/v6.2.7

alexeagle avatar Nov 05 '18 17:11 alexeagle

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 }));

This worked for me as well -- thanks!

pavedwave avatar Nov 05 '18 18:11 pavedwave

Updating to Angular CLI 6.2.7 fixed it for me.

"webpack": "4.24.0"

Did the job also for me.

florian-badaluma avatar Nov 06 '18 07:11 florian-badaluma

ng update --all did the work!

Worked for me as well.

emw-ghertner avatar Nov 06 '18 22:11 emw-ghertner

"webpack": "4.24.0"

worked for me! =) Thanks!

renancunha avatar Nov 09 '18 11:11 renancunha

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

deepatripathi avatar Nov 14 '18 04:11 deepatripathi

@angular/[email protected] alone didn't make it, had to upgrade one more:

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

awerlang avatar Nov 16 '18 14:11 awerlang

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

iamwillpowell avatar Nov 16 '18 18:11 iamwillpowell

I am facing same issue. None of the above solutions working for me . Any other suggestions ? try do it :npm uninstall webapck, then Can be fixed temporarily by adding this line to package.json

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

then npm install

CheeseZhao avatar Nov 26 '18 01:11 CheeseZhao

Got the error with "@angular/cli" 6.2.5 all the way to 6.2.8. @iamwillpowell's fix worked for me.

Any idea about what is causing the issue? Should we expect a patch in the 6.x branch? I have some projects in production and I'd like to avoid workarounds

Polyterative avatar Nov 27 '18 08:11 Polyterative

Same problem with me (Angular 6.1.10 and Angular Cli 6.2.7) Remove package-lock.json and npm cache clean --force && npm install --force Worked for me :)

bamossza avatar Nov 27 '18 08:11 bamossza

update from

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

to

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

Gorniv avatar Nov 28 '18 19:11 Gorniv

ng update @angular/cli worked for me

IniJr avatar Dec 01 '18 19:12 IniJr

update from

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

to

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

worked THANKS

mib-dotnet avatar Dec 06 '18 02:12 mib-dotnet

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.