Skip to content

bug: @ionic/vue v6 can't run build with vite #24005

Closed
@Ripwords

Description

@Ripwords

Prequisites

  • I have read the Contributing Guidelines.
    I agree to follow the Code of Conduct.
    I have searched for existing issues that already report this problem, without success.

Ionic Framework Version

  • v4.x
    v5.x
    v6.x

Current Behavior

node_modules/ionicons/dist/types/components.d.ts:66:15 - error TS2320: Interface 'HTMLIonIconElement' cannot simultaneously extend types 'IonIcon' and 'HTMLStencilElement'.
  Named property 'ariaLabel' of types 'IonIcon' and 'HTMLStencilElement' are not identical.
66     interface HTMLIonIconElement extends Components.IonIcon, HTMLStencilElement {       
                 ~~~~~~~~~~~~~~~~~~

image

npm run build (using vite) results in the above error

Expected Behavior

npm run build with no errors

Steps to Reproduce

running "npm run build" results in multiple of the above error messages, i found an issue regarding this over a year ago, but it was closed with no explanation on how the bug occurred.

I am using @ionic/vue V6 with vite

Please let me know if any further details are required

Code Reproduction URL

https://github.com/Ripwords/astro-calc

Ionic Info

image

Additional Information

Similar issue in #20208

Update

I was able to track down the issue in ionicons here. It seems to be a typescript version error, however the ionicons repo doesn't seem to be as active and I would rate this issue quite high since typescript is getting more and more popular

Activity

changed the title [-]bug: [/-] [+]bug: @ionic/vue v6 can't run build with vite[/+] on Oct 2, 2021
liamdebeasi

liamdebeasi commented on Oct 4, 2021

@liamdebeasi
Contributor

Thanks for the issue. If you add "skipLibCheck": true to your tsconfig.json file does that fix the issue? We recommend having this set (our starter apps have it set automatically). I also noticed running npm run build causes it to complain about some TypeScript files too, and setting skipLibCheck resolved both issues for me.

Ripwords

Ripwords commented on Oct 5, 2021

@Ripwords
Author

Thanks, I tested it and it's working as expected now. Maybe this could be mentioned in the docs for those who are adding ionic as a library instead of using the starter apps. Although that might be the minority of the users.

added and removed
needs: replythe issue needs a response from the user
on Oct 5, 2021
liamdebeasi

liamdebeasi commented on Oct 5, 2021

@liamdebeasi
Contributor

Glad it works. Yes, I agree this should be mentioned in the docs. I am going to close this issue for now, but we plan on having more docs on getting Ionic setup with Vite when Ionic 6 ships (this is being tracked internally).

ionitron-bot

ionitron-bot commented on Nov 4, 2021

@ionitron-bot

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. 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.

locked and limited conversation to collaborators on Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @liamdebeasi@Ripwords

        Issue actions

          bug: @ionic/vue v6 can't run build with vite · Issue #24005 · ionic-team/ionic-framework