vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.76k stars 388 forks source link

vue-tsc error TS7056 : The inferred type of this node exceeds the maximum length the compiler will serialize #2430

Closed messenjer closed 1 year ago

messenjer commented 1 year ago

Describe the bug

Hi,

I have this error on the repo MaxLeiter/sortablejs-vue3, when I run pnpm run build

> vite build && vue-tsc --emitDeclarationOnly --project tsconfig.dist.json && mv dist/lib dist/types && rm -rf dist/favicon.ico

vite v4.0.4 building for production...
✓ 4 modules transformed.
dist/sortablejs-vue3.es.js  3.53 kB │ gzip: 1.16 kB
dist/sortablejs-vue3.umd.js  2.00 kB │ gzip: 0.99 kB
src/components/Sortable.vue:6:1 - error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.

  6 type SortableOptionsProp = Omit<
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7   SortableOptions | AutoScrollOptions,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
134 });
    ~~~
135 </script>

Found 1 error in src/components/Sortable.vue:6

 ELIFECYCLE  Command failed with exit code 1.

Thanks

Used Package Manager

pnpm

messenjer commented 1 year ago

Ok I thought it was just on my end. I'll try it with a previous version of vue-tsc.

messenjer commented 1 year ago

It was fixed https://github.com/MaxLeiter/sortablejs-vue3/issues/72