bug: TS2320: Interface 'HTMLIonInputElement' cannot simultaneously extend types 'IonInput' and 'HTMLStencilElement'

Ouverte
#30,650 16 commentaires 29 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
52/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Calme
Stack technique
angular, typescript
Domaine
frontend

Piste de recherche

Commencez par reproduire le problème avec Angular 20.2.0, TypeScript 5.9.2 et npx ng serve. Examinez les déclarations autour des lignes 4326 et 4888 dans node_modules/@ionic/core/dist/types/components.d.ts, où se produisent les conflits d’interfaces signalés. C’est terminé lorsque le projet se compile et est servi sans les erreurs TS2320.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

stencil type: bug
Prerequisites
Ionic Framework Version

v8.x

Current Behavior

since angular 20.2.0 released recently and typescript v5.9 is being supported

I upgraded dependencies of my project and the message pop up when serving the project

X [ERROR] TS2320: Interface 'HTMLIonInputElement' cannot simultaneously extend types 'IonInput' and 'HTMLStencilElement'.
  Named property 'autocorrect' of types 'IonInput' and 'HTMLStencilElement' are not identical. [plugin angular-compiler]

    node_modules/@ionic/core/dist/types/components.d.ts:4326:14:
      4326 │     interface HTMLIonInputElement extends Components.IonInput, H...

X [ERROR] TS2320: Interface 'HTMLIonSearchbarElement' cannot simultaneously extend types 'IonSearchbar' and 'HTMLStencilElement'.
  Named property 'autocorrect' of types 'IonSearchbar' and 'HTMLStencilElement' are not identical. [plugin angular-compiler]

    node_modules/@ionic/core/dist/types/components.d.ts:4888:14:
      4888 │     interface HTMLIonSearchbarElement extends Components.IonSear...

and my project went well with [email protected].* and [email protected].*

Expected Behavior

Success to build and serve

Steps to Reproduce
  1. update deps with [email protected] and [email protected]
  2. try to serve with npx ng serve
Ionic Info

Ionic:

Ionic CLI : 7.2.1 (C:\Users\USER\AppData\Local\npm-cache_npx\f6fddb685269761d\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 8.7.2
@angular-devkit/build-angular : not installed
@angular-devkit/schematics : 20.2.0
@angular/cli : 20.2.0
@ionic/angular-toolkit : not installed

Capacitor:

Capacitor CLI : 7.4.2
@capacitor/android : 7.4.2
@capacitor/core : 7.4.2
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v24.6.0 (C:\Program Files\nodejs\node.exe)
npm : 11.5.2
OS : Windows 10


Sorry for my poor English 😆

Langage dominant
TypeScript
Étoiles
52.8k
Forks
13.3k
Merge moyen
3 j 1 h
PR mergées (30 j)
86

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de ionic-team/ionic-framework

Toutes les issues de ionic-team/ionic-framework

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.