Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 of 6 tasks
Ripwords opened this issue Oct 1, 2021 · 4 comments
Closed
4 of 6 tasks

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

Ripwords opened this issue Oct 1, 2021 · 4 comments
Labels

Comments

@Ripwords
Copy link

Ripwords commented Oct 1, 2021

Prequisites

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

@ionitron-bot ionitron-bot bot added the triage label Oct 1, 2021
@Ripwords Ripwords changed the title bug: bug: @ionic/vue v6 can't run build with vite Oct 2, 2021
@liamdebeasi
Copy link
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.

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Oct 4, 2021
@ionitron-bot ionitron-bot bot removed the triage label Oct 4, 2021
@Ripwords
Copy link
Author

Ripwords commented Oct 5, 2021

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.

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Oct 5, 2021
@liamdebeasi
Copy link
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
Copy link

ionitron-bot bot commented Nov 4, 2021

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants