Schema validation failed: Data path "" should NOT have additional properties

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ ] devkit
- [x] schematics

Versions

Angular CLI: 6.0.8
Node: 8.11.2
OS: win32 x64
Angular: 6.0.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.6.8
@angular-devkit/schematics        0.6.8
@angular/cli                      6.0.8
@ngtools/webpack                  6.0.8
@schematics/angular               0.6.8
@schematics/update                0.6.8
rxjs                              6.2.1
typescript                        2.7.2
webpack                           4.8.3

Repro steps

  1. Add projects/architect/<section>/options/invalid options to options in angular.json eg
    "build": {
           "builder": "@angular-devkit/build-angular:browser",
           "options": {
             "invalid": "value", 
             ...
           }
    }
    
  2. Run ng build

Actual functionality

Schema validation failed with the following errors:
  Data path "" should NOT have additional properties(invalid).

Desired functionality

Schema validation failed with the following errors:
  Data path "path/to/invalid/option" should NOT have additional properties(invalid).

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:21
  • Comments:21 (1 by maintainers)

github_iconTop GitHub Comments

68reactions
stefantrostcommented, Apr 12, 2019

For anyone having this problem while updating Ionic from 3 to 4: I had to remove “es5BrowserSupport”: true from angular.json

16reactions
jnfaerchcommented, Nov 27, 2020

Apart from the error message not telling WHERE the problem is, it does tell you WHAT the problem is. I fixed one error and it gave me the next, which I fixed and so on.

Angular 11 with latest packages including "@angular-devkit/build-angular": "^0.1100.2"

For me it was my angular.json e2e lint where I had to change

from this

                "lint": {
                    "builder": "@angular-eslint/builder:lint",
                    "options": {
                        "tsConfig": "e2e/tsconfig.e2e.json",
                        "exclude": ["**/node_modules/**"]
                    }
                }

to this

                "lint": {
                    "builder": "@angular-eslint/builder:lint",
                    "options": {
                        "lintFilePatterns": ["e2e/**/*.ts", "e2e/**/*.html"]
                    }
                }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Schema validation failed with the following errors: Data ...
Error: Schema validation failed with the following errors: Data path ... Data path "" should NOT have additional properties(serverTarget).
Read more >
Running a Translated Angular Application using the Angular CLI
i get: Schema validation failed with the following errors: Data path "" must NOT have additional properties(i18nFile). I would really appreciate if someone ......
Read more >
angular/angular - Gitter
Schema validation failed with the following errors: Data path "" should NOT have additional properties(fileReplacements). ahmetbasaran. @ahmetbasaran.
Read more >
Schema validation failed with the following errors: Data path ...
[Solved]-Error: Schema validation failed with the following errors: Data path "" should NOT have additional properties(project)-angular.js · score:6. Accepted ...
Read more >
Hi Jacob, thanks for sharing ! I could make it work for Angular ...
I got an error `Schema validation failed with the following errors: Data path "" should NOT have additional properties(customWebpackConfig).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found