angular / angular/angular-cli

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

Open
#11,479 22 comments 26 reactions 0 assignees View on GitHub
area: @angular-devkit/core freq2: medium needs: investigation severity1: confusing type: bug/fix
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

### 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//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).
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing schema validation during `ng build` for the `angular.json` build options shown in the reproduction. Confirm where the invalid option is reported and update the diagnostic so it includes the relevant option path, then verify the output matches the desired functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.