Errors: Data path “.builders['app-shell']” should have required property 'class'

前端 未结 20 1334
心在旅途
心在旅途 2020-11-30 19:27

I am getting this error while running my application. Here are the details of my application.

Angular CLI: 7.3.3 
Node: 10.15.1 
Angular: 7.2.7 
@angular-de         


        
相关标签:
20条回答
  • 2020-11-30 20:13

    Try update the package.json file from

      "@angular-devkit/build-angular": "^0.800.1" 
    

    to

      "@angular-devkit/build-angular": "^0.12.4"
    

    Then run npm install in the command line.

    0 讨论(0)
  • 2020-11-30 20:15

    In your package.json change the devkit builder.

    "@angular-devkit/build-angular": "^0.800.1",
    

    to

    "@angular-devkit/build-angular": "^0.10.0",
    

    it works for me.
    good luck.

    0 讨论(0)
  • 2020-11-30 20:15

    Everyone is focusing on downgrading @angular-devkit/build-angular version to X, or upgrading @angular/cli version to Y or latest.

    However, Please do not blindly suggest an X or Y or latest as answers. (Though usually, downgrading devkit should be better because upgrading CLI is a breaking change)

    The correct version to choose, always depends on your Angular (angular-cli) version.

    Angular CLI v8.3.19 -> 0.803.19
    Angular CLI v8.3.17 -> 0.803.17
    Angular CLI v7.3.8 -> 0.13.8
    Angular CLI v6-lts -> 0.8.9
    

    For other specific versions, visit: https://github.com/angular/angular-cli/tags. Find your CLI version, and in some tags, they do mention the corresponding versions for @angular-devkit/** packages.

    Note: If you want to upgrade your CLI version, you should first consider upgrading to latest of your major version, do not simply jump to the next major version.

    0 讨论(0)
  • 2020-11-30 20:16

    On my side it was package

    @angular-devkit/build-angular

    and

    @angular-devkit/build-ng-packagr

    was not the same version, Updating build-ng-packagr to same version as build-angular fixed my problem.

    0 讨论(0)
  • 2020-11-30 20:17

    I changed @angular-devkit/build-angular": "0.9.0.1" to @angular-devkit/build-angular": "0.13.4" and it worked.

    0 讨论(0)
  • 2020-11-30 20:17

    I also faced this issue and struggled hours to solve it, I have tried all of the above options but nothing solved my problem. This issue occurs due to version mismatch of angular/cli and angular-devkit, so I did the following :

    1. Manually changed version of files:

      @angular-devkit/build-angular": "^0.13.9",

      @angular/cli": "~7.0.3", //This is for Angular7, for Angular8 : 0.803.23

    2. Deleted package-lock.json

    3. Executed : npm install

    It solved my problem.

    0 讨论(0)
提交回复
热议问题