4

I am using Angular Cli to create component.

I am using this command:

ng g c DeviceComponent --module=./views/administration/Accounting.module.ts --spec=false --flat

I got the warning :

Option "entryComponent" is deprecated: Since version 9.0.0 with Ivy, entryComponents is no longer necessary.

and The component does not created My Angular version is:

Angular CLI: 10.2.0
Node: 12.18.3
OS: win32 x64

Angular: 10.2.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1000.8
@angular-devkit/build-angular   0.1000.8
@angular-devkit/core            10.0.8
@angular-devkit/schematics      10.2.0
@angular/cdk                    10.2.5
@schematics/angular             10.2.0
@schematics/update              0.1002.0
rxjs                            6.6.3
typescript                      3.9.7

I have read this post but it does not help me Nativescript error 'Cannot read property 'kind' of undefined' when run 'ng generate component'

I have done

 npm install --save-dev typescript@4

but it is the same error

Anyone could help me please?

Medhat Mahmoud
  • 512
  • 1
  • 5
  • 25
  • 1
    So you got a warning. Did the component get generated?? – R. Richards Nov 13 '20 at 14:36
  • 2
    Does this answer your question? [Nativescript error 'Cannot read property 'kind' of undefined' when run 'ng generate component'](https://stackoverflow.com/questions/64236189/nativescript-error-cannot-read-property-kind-of-undefined-when-run-ng-gener) – Giannis Nov 13 '20 at 14:36
  • @R.Richards I have edited the question and the answer no – Medhat Mahmoud Nov 13 '20 at 14:43
  • @Giannis npm install --save-dev typescript@4 does not help me , the same error – Medhat Mahmoud Nov 13 '20 at 14:44
  • 2
    Angular has an thing it throws errors even it has nothing to do with your new component. Do you have an entryComponent in your app.module.ts and if so try to remove it and then run ur generate command. As your error says its deprecated in version 10 and should be removed ;) – Tom Nov 13 '20 at 14:45
  • @Tom I have removed the entry component but the same error – Medhat Mahmoud Nov 13 '20 at 14:49
  • 1
    Hmm any other modules with entryComponents than? Otherwise maybe some cache, but can't remember angular cli caches anything – Tom Nov 13 '20 at 14:55
  • @Tom I have a thought like your thinking and I also remove any entry component but the same :(, would you please upvote the question to make more members view the questions :) – Medhat Mahmoud Nov 13 '20 at 14:58
  • I have the same error, I can't generate new components and I don't use any entryComponents – Przemo Nov 15 '20 at 11:26
  • did you solve this problem? then please put the answer @MedhatMahmoud – Damika Feb 22 '22 at 06:04

1 Answers1

-1

I think you are using entryComponent in one of your module. It was necessary when you were rendering dynamically angular components (modals, popups) in previous versions of Angular.

Filip
  • 143
  • 1
  • 8