Skip to content

@angular-devkit/build-angular 0.803.14 results in devServer error #15975

@the-ult

Description

@the-ult

🐞 Bug report

Command (mark with an x)

  • serve

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

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

Description

After updating Angular and the CLI etc with the latest: "@angular-devkit/build-angular": "0.803.14",
ng serve gives the following error:

> ng serve "frontend-with-graphql"

An unhandled exception occurred: webpack Dev Server Invalid Options

options should NOT have additional properties

N.B.

  • the same issue happens with a newly generated app
  • And with all other projects removed from angular.json

🔬 Minimal Reproduction

Upgrade to "@angular-devkit/build-angular": "0.803.14",

🔥 Exception or Error


❯ cat /tmp/ng-OxQsei/angular-errors.log
[error] ValidationError: webpack Dev Server Invalid Options

options should NOT have additional properties

    at validateOptions (/home/the_ult/dev/tkp/nx/node_modules/schema-utils/src/validateOptions.js:32:11)
    at new Server (/home/the_ult/dev/tkp/nx/node_modules/webpack-dev-server/lib/Server.js:83:3)
    at Observable._subscribe (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/src/webpack-dev-server/index.js:28:24)
    at Observable._trySubscribe (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/Observable.js:44:25)
    at Observable.subscribe (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/Observable.js:30:22)
    at /home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/util/subscribeTo.js:22:31
    at Object.subscribeToResult (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/util/subscribeToResult.js:10:45)
    at SwitchMapSubscriber._innerSub (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/operators/switchMap.js:65:54)
    at SwitchMapSubscriber._next (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/operators/switchMap.js:55:14)
    at SwitchMapSubscriber.Subscriber.next (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/Subscriber.js:66:18)
    at Observable._subscribe (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/observable/scalar.js:6:20)
    at Observable._trySubscribe (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/Observable.js:44:25)
    at Observable.subscribe (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/Observable.js:30:22)
    at SwitchMapOperator.call (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/operators/switchMap.js:33:23)
    at Observable.subscribe (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/Observable.js:25:31)
    at MapOperator.call (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/map.js:32:23)
    at Observable.subscribe (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/internal/Observable.js:25:31)
    at /home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/util/subscribeToObservable.js:10:20
    at Object.subscribeToResult (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/util/subscribeToResult.js:10:45)
    at SwitchMapSubscriber._innerSub (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/switchMap.js:65:54)
    at SwitchMapSubscriber._next (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/operators/switchMap.js:55:14)
    at SwitchMapSubscriber.Subscriber.next (/home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/Subscriber.js:66:18)
    at /home/the_ult/dev/tkp/nx/node_modules/@angular-devkit/build-angular/node_modules/rxjs/internal/util/subscribeToPromise.js:7:24
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
  • Could be a combination of NX with Angular?

🌍 Your Environment


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

Angular CLI: 8.3.15
Node: 12.9.1
OS: linux x64
Angular: 8.2.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.3
@angular-devkit/build-angular     0.803.13
@angular-devkit/build-optimizer   0.803.13
@angular-devkit/build-webpack     0.803.13
@angular-devkit/core              8.3.15
@angular-devkit/schematics        8.3.3
@angular/cdk                      8.2.3
@angular/cli                      8.3.15
@angular/material                 8.2.3
@ngtools/webpack                  8.3.13
@schematics/angular               8.3.3
@schematics/update                0.803.15
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.39.2
-----------------------------------------------------------
"@nrwl/angular": "8.7.0",
"@nrwl/cypress": "8.7.0",
"@nrwl/eslint-plugin-nx": "8.7.0",
"@nrwl/express": "8.7.0",
"@nrwl/jest": "8.7.0",
"@nrwl/node": "8.7.0",
"@nrwl/workspace": "8.7.0",

Anything else relevant?
I first tought the issue was caused by NX (upgraded to 8.7.0) or Angular 9.

  • cleanup up the complete angular.json

  • checked all settings in angular.json etc.

  • to be sure I tested with style and skipTests as well

Deprecated styleext and spec options have been removed. Use style and skipTests options instead.

Example repo:

https://gitlab.com/ultimate-solutions/ultimate-nx-starter-workspace

This is a (first | WIP) setup for some best practices etc. Yet Another Starter Project
With NX, Angular and GraphQL

npm run start simple-app
  • upgrading "@angular-devkit/build-angular": "0.803.13", to "@angular-devkit/build-angular": "0.803.14", shows the ERROR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions