Skip to content

Schema Validation Failed #416

@vikassaini80

Description

@vikassaini80

Hi Everyone

I am facing an issue during angular 17 to 19 upgrade and getting below error :

Error: Schema validation failed with the following errors:
Data path "" must have required property 'buildTarget'.

tried solution given on #405

but no luck

below is my angular.json

{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"MyProject": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "qcare",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.single-spa.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/assets"
],
"styles": [
"node_modules/@ecp/angular-ui-component-library/xxxxx.css",
"src/styles.scss"
],
"preserveSymlinks": true,
"scripts": [],
"customWebpackConfig": {
"path": "extra-webpack.config.js",
"libraryName": "MyProject",
"libraryTarget": "umd"
}
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"baseHref": "/",
"deployUrl": "/microproduct/MyProject-service.qcare.svc.cluster.local/",
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "10mb",
"maximumError": "20mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
},
"dev": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"tsConfig": "tsconfig.dev.json",
"main": "src/main.ts",
"sourceMap": true,
"optimization": false
},
"local": {
"optimization": false,
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"tsConfig": "tsconfig.lcl.json",
"main": "src/main.ts",
"sourceMap": true
}
}
},
"serve": {
"builder": "ngx-build-plus:dev-server",
"options": {
"ssl": true,
"browserTarget": "MyProject:build"
},
"configurations": {
"production": {
"browserTarget": "MyProject:build:production"
},
"dev": {
"browserTarget": "MyProject:build:dev"
},
"local": {
"browserTarget": "MyProject:build:local"
}
}
},
"single-spa-serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"ssl": true,
"browserTarget": "MyProject:build",
"port": 4202,
"liveReload": false,
"disableHostCheck": true
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "MyProject:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [],
"codeCoverageExclude": ["//mock.ts"],
"codeCoverage": true
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/
/.ts",
"src/**/
.html"
],
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json"
],
"exclude": [
"/node_modules/"
]
}
}
}
}
},
"cli": {
"analytics": false,
"cache": {
"enabled": false
},
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}

any help will be appericiated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions