Skip to content
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

adding component with mixin results in error TS2604 #251

Open
emilefokkema opened this issue Apr 12, 2023 · 0 comments
Open

adding component with mixin results in error TS2604 #251

emilefokkema opened this issue Apr 12, 2023 · 0 comments
Labels

Comments

@emilefokkema
Copy link

First off, this may not be a problem with create-vue. It may be a problem in vue itself, or in typescript, or vue-tsc, or somewhere else. It may be related in some way to this discussion. I simply don't know. Maybe someone can help.

My problem occurs when I do the following:

  • on windows. Node version 18.12.1. Npm version 9.2.0.
  • execute npx [email protected], supplying the following options:
    • Add TypeScript? ... Yes
    • Add JSX Support? ... No
    • Add Vue Router for Single Page Application development? ... Yes
    • Add Pinia for state management? ... No
    • Add Vitest for Unit Testing? ... Yes
    • Add Cypress for End-to-End testing? ... No
    • Add ESLint for code quality? ... Yes
    • Add Prettier for code formatting? ... Yes
  • the result is (something very close to) this commit
  • remove a file to bypass this issue and make npm run build succeed. The result is (something very close to) this commit
  • This introduces my problem: add two new components in the Vue.extend({ /*...*/}) way, with one of them having a mixins. Like this.

When I now run npm run build, I get

error TS2604: JSX element type 'SecondComponent' does not have any construct or call signatures.

I did not expect this error. Especially since I'm not doing anything related to react or jsx. Also: this is only a type-checking issue, because npm run build-only does succeed, as does actually running and displaying the app using npm run dev. What am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants