Subscribe on changes!

Type 'HostElement' does not satisfy the constraint 'RendererElement'

avatar
Sep 6th 2022

Vue version

3.2.36

Link to minimal reproduction

https://github.com/Ragura/vue3-pnpm-workspace

Steps to reproduce

Run pnpm i followed by pnpm build to see the type error pop up after trying to build the components project.

What is expected?

It should type check and build without the type error: Type 'HostElement' does not satisfy the constraint 'RendererElement'

This did not happen with Typescript 4.7, but it's doing it with 4.8. Therefore it's hard to see if it's a Vue error or a typescript bug, but I found no reports of this on their repo.

What is actually happening?

The error Type 'HostElement' does not satisfy the constraint 'RendererElement' appears during the typecheck/build step of the components project. Changing typescript version to 4.7 (instead of 4.8) removes the error and the build passes.

System Info

System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 91.81 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 17.0.1 - ~/.nvm/versions/node/v17.0.1/bin/node
    npm: 8.13.1 - ~/.nvm/versions/node/v17.0.1/bin/npm
  Browsers:
    Chrome: 104.0.5112.101
    Safari: 15.5

Any additional comments?

No response

avatar
Sep 7th 2022

i encounter this Issue too, how to fix it?

avatar
Sep 7th 2022

my @vue/runtime-core is v3.2.38

avatar
Sep 7th 2022

Duplicate of #6554 . Solution was meeged but hasnt been released yet.