bug: Interface 'HTMLIonIconElement' cannot simultaneously extend types 'IonIcon' and 'IonIcon'
See original GitHub issueBug Report
Ionic version:
[x] 4.x
Current behavior:
I’m trying to use Ionic components in my angular library (npm module). I’ve created the angular library using this manual. Then I’ve installed @ionic/angular to package.json dependencies. And if I import anything from “@ionic/angular” (for example “import { IonicModule } from “@ionic/angular”;”) I’m getting many errors like this in “node_modules/ionicons/dist/types/components.d.ts(63,13):”:
TS2320: Interface 'HTMLIonIconElement' cannot simultaneously extend types 'IonIcon' and 'IonIcon'.
Named property ''icon'' of types 'IonIcon' and 'IonIcon' are not identical.
TS2320: Interface 'HTMLIonIconElement' cannot simultaneously extend types 'HTMLStencilElement' and 'HTMLStencilElement'.
Named property 'forceUpdate' of types 'HTMLStencilElement' and 'HTMLStencilElement' are not identical.
Expected behavior:
import should not cause errors
Steps to reproduce:
- Generate new angular library:
ng new my-workspace --create-application=false
cd my-workspace
ng generate library my-lib
- install “@ionic/angular” module in the library
npm i @ionic/angular --save
- import anything from @ionic/angular:
import { IonicModule } from "@ionic/angular";
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Interface 'HTMLIonIconElement' cannot simultaneously extend ...
bug : Interface 'HTMLIonIconElement' cannot simultaneously extend types 'IonIcon' and 'HTMLStencilElement'. Named property 'ariaHidden' of types 'IonIcon' ...
Read more >Interface 'HTMLIonIconElement' cannot simultaneously extend ...
It seems that ng update updated the typescript version to 4.4, but ionic ion-icon seems to be incompatible with this version of typescript....
Read more >Interface 'HTMLIonIconElement' cannot simultaneously extend ...
After upgrading to Angular 12, I get the following error when running ionic serve: [ng] Build at: 2021-08-30T19:51:32.148Z - Hash: ...
Read more >Interface 'HTMLIonIconElement' cannot simultaneously extend ...
Angular 12: Interface 'HTMLIonIconElement' cannot simultaneously extend types 'IonIcon' and 'HTMLStencilElement' ... Any ideas how to solve this? Thank you very ...
Read more >Ionic stupid simple. - DEV Community
If You get an error that looks like this: ... 'HTMLIonInputElement' cannot simultaneously extend types 'IonInput' and 'HTMLStencilElement'.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same here, update of ionic/core to 5.0.4, ionic/vue to 0.0.9 didn’t fix it.
Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!