angular / angular/angular-cli

[schematics] more details about the missing fields

Open
#16,150 2 comments 0 reactions 0 assignees View on GitHub
area: @angular-devkit/schematics freq1: low severity3: broken type: bug/fix
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

Error: Schematic "init" is missing fields.
what exactly the missing fields?

```
//collection.json
{
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
"schematics": {
"init": {
"description": "creates a new builder",
"factory": "./index#init",
"schema": "./init.schema.json"
}
}
}
```
modify:
after houres of inspecting, the issue was from another schematic ( i.e: using externalSchematic() )
so, it is better to explain whitch schematic that this issue belongs to

Contributor guide

Open the contributing guide

Research direction

Start with the schematics error path involved when resolving the `init` entry in `collection.json`, then reproduce the case where `externalSchematic()` invokes another schematic. Trace how `init.schema.json` and the external schematic are identified; done means the error names the schematic that owns the missing fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
cli, tooling
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.