Subscribe on changes!

TypeScript error "Module vue has no exported..." for composition API

avatar
May 23rd 2023

Vue version

3.3.4

Link to minimal reproduction

https://github.com/kevinmnm/vue3-composition-api-ts-error-reproduction

Steps to reproduce

Clone the repository https://github.com/kevinmnm/vue3-composition-api-ts-error-reproduction and check TodoComp.vue file.

What is expected?

No typescript error.

What is actually happening?

image

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (16) x64 AMD Ryzen 7 5800 8-Core Processor
    Memory: 17.27 GB / 31.92 GB
  Binaries:
    Node: 16.19.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.3.1 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1702.0), Chromium (113.0.1774.50)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vue: ^3.2.47 => 3.3.4

Any additional comments?

No response

avatar
May 23rd 2023

Fixed by adding import '@vue/runtime-core' in global.d.ts file.