Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

adding component with mixin results in error TS2604 #251

Open
Labels
@emilefokkema

Description

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 create-vue@2.2.0, 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?

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

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /