InvalidInputOptions error when adding component to angular 11

Viewed 158

Odd Error when adding a component using ng g c deviceAdd This had been working previous me to deleting my node_modules directory and re-adding it. Any ideas why this could be happening?

Thanks!

Your global Angular CLI version (12.0.0) is greater than your local version (11.2.13). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
InvalidInputOptions [Error]: Schematic input does not validate against the Schema: {"style":"less","path":"apps/client/src/app/devices","project":"client","name":"deviceCreate","displayBlock":false,"inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","type":"Component","skipTests":false,"flat":false,"skipImport":false,"skipSelector":false,"export":false,"entryComponent":false}
Errors:

  Data path "" should NOT have additional properties(entryComponent).
    at MapSubscriber.project (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/schematics/tools/schema-option-transform.js:32:27)
    at MapSubscriber._next (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/operators/map.js:49:35)
    at MapSubscriber.Subscriber.next (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:66:18)
    at SafeSubscriber.__tryOrUnsub (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:205:16)
    at SafeSubscriber.next (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:143:22)
    at Subscriber._next (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:89:26)
    at Subscriber.next (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/core/node_modules/rxjs/internal/Subscriber.js:66:18)
    at SafeSubscriber.__tryOrUnsub (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:205:16)
    at SafeSubscriber.next (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/Subscriber.js:143:22)
    at ThrowIfEmptySubscriber._next (/home/kevin/source/repos/application/application-web/node_modules/@angular-devkit/schematics/node_modules/rxjs/internal/operators/throwIfEmpty.js:44:26) {
  errors: [
    {
      keyword: 'additionalProperties',
      dataPath: '',
      schemaPath: '#/additionalProperties',
      params: [Object],
      message: 'should NOT have additional properties'
    }
  ]
}
Schematic input does not validate against the Schema: {"style":"less","path":"apps/client/src/app/devices","project":"client","name":"deviceCreate","displayBlock":false,"inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","type":"Component","skipTests":false,"flat":false,"skipImport":false,"skipSelector":false,"export":false,"entryComponent":false}
Errors:

  Data path "" should NOT have additional properties(entryComponent).
1 Answers

My suggestion is to update the Angular version of your project ng update (https://update.angular.io/?v=11.0-12.0)

The first warning is because you have installed higher version of the Angular CLI globally then the one used by your project. The second error is caused by the bug in the @schematics/angular of Angular 12 (in Angular 12.0.2 it's already fixed).

The update should solve both of the problems.

Related