1

{
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "version": 1,
    "newProjectRoot": "projects",
    "projects": {
        "demoProject": {
            "root": "",
            "sourceRoot": "src",
            "projectType": "application",
            "prefix": "app",
            "schematics": {},
            "architect": {
                "build": {
                    "builder": "@angular-devkit/build-angular:browser",
                    "options": {
                        "outputPath": "dist/hrms",
                        "index": "src/index.html",
                        "main": "src/main.ts",
                        "polyfills": "src/polyfills.ts",
                        "tsConfig": "src/tsconfig.app.json",
                        "assets": [
                            "src/favicon.ico",
                            "src/assets",
                            "src/main"
                        ],
                        "styles": [
                            "node_modules/bootstrap/dist/css/bootstrap.min.css",
                            "node_modules/ion-rangeslider/css/ion.rangeSlider.css",
                            "node_modules/ngx-bootstrap/datepicker/bs-datepicker.css",
                            "node_modules/ion-rangeslider/css/ion.rangeSlider.skinFlat.css",
                            "node_modules/ngx-toastr/toastr.css",
                            "src/styles.css",
                            "src/main.css"
                        ],
                        "scripts": [
                            "node_modules/jquery/dist/jquery.min.js",
                            "node_modules/bootstrap/dist/js/bootstrap.min.js",
                            "node_modules/ion-rangeslider/js/ion.rangeSlider.min.js"
                        ]
                    },
                    "configurations": {
                        "production": {
                            "fileReplacements": [
                                {
                                    "replace": "src/environments/environment.ts",
                                    "with": "src/environments/environment.prod.ts"
                                }
                            ],
                            "optimization": true,
                            "outputHashing": "all",
                            "sourceMap": false,
                            "extractCss": true,
                            "namedChunks": false,
                            "aot": true,
                            "extractLicenses": true,
                            "vendorChunk": false,
                            "buildOptimizer": true
                        }
                    }
                },
                "serve": {
                    "builder": "@angular-devkit/build-angular:dev-server",
                    "options": {
                        "browserTarget": "hrms:build"
                    },
                    "configurations": {
                        "production": {
                            "browserTarget": "hrms:build:production"
                        }
                    }
                },
                "extract-i18n": {
                    "builder": "@angular-devkit/build-angular:extract-i18n",
                    "options": {
                        "browserTarget": "hrms:build"
                    }
                },
                "test": {
                    "builder": "@angular-devkit/build-angular:karma",
                    "options": {
                        "main": "src/test.ts",
                        "polyfills": "src/polyfills.ts",
                        "tsConfig": "src/tsconfig.spec.json",
                        "karmaConfig": "src/karma.conf.js",
                        "styles": [
                            "src/styles.css"
                        ],
                        "scripts": [],
                        "assets": [
                            "src/favicon.ico",
                            "src/assets"
                        ]
                    }
                },
                "lint": {
                    "builder": "@angular-devkit/build-angular:tslint",
                    "options": {
                        "tsConfig": [
                            "src/tsconfig.app.json",
                            "src/tsconfig.spec.json"
                        ],
                        "exclude": [
                            "**/node_modules/**"
                        ]
                    }
                }
            }
        },
        "hrms-e2e": {
            "root": "e2e/",
            "projectType": "application",
            "architect": {
                "e2e": {
                    "builder": "@angular-devkit/build-angular:protractor",
                    "options": {
                        "protractorConfig": "e2e/protractor.conf.js",
                        "devServerTarget": "hrms:serve"
                    },
                    "configurations": {
                        "production": {
                            "devServerTarget": "hrms:serve:production"
                        }
                    }
                },
                "lint": {
                    "builder": "@angular-devkit/build-angular:tslint",
                    "options": {
                        "tsConfig": "e2e/tsconfig.e2e.json",
                        "exclude": [
                            "**/node_modules/**"
                        ]
                    }
                }
            }
        }
    },
    "defaultProject": "hrms"
}

{
  "name": "demoProject",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng build && node ./bin/www",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/cdk": "^5.2.0",
    "@angular/common": "^5.2.0",
    "@angular/compiler": "^5.2.0",
    "@angular/core": "^5.2.0",
    "@angular/forms": "^5.2.0",
    "@angular/http": "^5.2.0",
    "@angular/material": "^5.2.0",
    "@angular/platform-browser": "^5.2.0",
    "@angular/platform-browser-dynamic": "^5.2.0",
    "@angular/router": "^5.2.0",
    "@ng-bootstrap/ng-bootstrap": "^1.1.2",
    "amazing-time-picker": "^1.5.3",
    "angular-2-dropdown-multiselect": "^1.8.1",
    "angular-datatables": "^6.0.0",
    "angular2-datetimepicker": "^1.1.1",
    "angular2-multiselect-dropdown": "^2.9.0",
    "angular4-datepicker": "^1.0.1",
    "body-parser": "^1.18.3",
    "bootstrap": "^4.3.1",
    "chart.js": "^2.5.0",
    "core-js": "^2.4.1",
    "crypto-js": "^3.1.9-1",
    "datatables.net": "^1.10.16",
    "datatables.net-dt": "^1.10.16",
    "express": "^4.16.3",
    "jquery": "^3.4.1",
    "json-validation": "^1.0.4",
    "moment": "^2.22.2",
    "morgan": "^1.9.1",
    "mysql": "^2.15.0",
    "ng-circle-progress": "^1.0.0",
    "ng-multiselect-dropdown": "^0.2.0",
    "ng-select": "^1.0.0-rc.5",
    "ng2-date-picker": "^2.10.2",
    "ng2-file-upload": "^1.3.0",
    "ng2-ion-range-slider": "^2.0.0",
    "ng2-select": "^2.0.0",
    "ng4-loading-spinner": "^1.2.3",
    "ngx-bar-rating": "^1.1.0",
    "ngx-bootstrap": "^2.0.5",
    "ngx-loading": "^1.0.14",
    "ngx-spinner": "^2.0.0",
    "ngx-toastr": "^8.1.0",
    "request": "^2.88.0",
    "request-promise": "^4.2.2",
    "rxjs": "^5.5.6",
    "serve-favicon": "^2.5.0",
    "timepicker.js": "^2.4.0",
    "zone.js": "^0.8.19"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.800.2",
    "@angular/cli": "~6.0.5",
    "@angular/compiler-cli": "^5.2.0",
    "@angular/language-service": "^5.2.0",
    "@types/datatables.net": "^1.10.13",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/jquery": "^3.3.5",
    "@types/node": "^6.0.116",
    "codelyzer": "^4.4.3",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^2.0.5",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^5.4.1",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "~2.5.3"
  }
}

I am not able to use any ng command like build or serve, it gives me the error below and I am not able to resolve.

Schema validation failed with the following errors: Data path ".builders['app-shell']" should have required property 'class'. Error: Schema validation failed with the following errors: Data path ".builders['app-shell']" should have required property 'class'. at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (/home/divx/Documents/projects/project_source_code/todoapplication/node_modules/@angular-devkit/core/src/workspace/workspace.js:173:42)

https://i.sstatic.net/yN1zf.png

1 Answer 1

1

Did you recently upgrade your Angular versions? It seems the CLI cannot validate the schema in your angular.json file, which has changed recently with the release of Angular 8.

Can you share your angular.json or at least the schema which is defined on the top of the file?

Sign up to request clarification or add additional context in comments.

3 Comments

No i havent updated my angular version Angular CLI: 6.0.8 Node: 10.7.0 OS: linux x64 Angular: ... Package Version ------------------------------------------------------ @angular-devkit/architect 0.6.8 @angular-devkit/core 0.6.8 @angular-devkit/schematics 0.6.8 @schematics/angular 0.6.8 @schematics/update 0.6.8 rxjs 6.2.2 typescript 2.7.2
Hmmm I think the angular.json is more interesting here including your package.json, if you could add those to your question?
Your versions are a bit weird, you're running Angular CLI 6, but version 5 of everything else Angular. What's the output of ng update?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.