vuejs / language-tools

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

After update, vue-tsc generates: "TypeError: (0 , language_core_1.buildMappings) is not a function" #4493

Closed crystalfp closed 1 week ago

crystalfp commented 1 week ago

Vue - Official extension or vue-tsc version

vue-tsc: 5.5.2

VSCode version

1.90.2

Vue version

3.4.30

TypeScript version

5.5.2

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 14.29 GB / 31.77 GB
  Binaries:
    Node: 21.6.2 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 126.0.6478.63
    Edge: Chromium (126.0.2592.68)
    Internet Explorer: 11.0.22621.3527

Steps to reproduce

$ npx vue-tsc
TypeError: (0 , language_core_1.buildMappings) is not a function
    at D:\Projects\STMng\node_modules\@vue\language-core\lib\virtualFile\computedFiles.js:152:64
    at Array.map (<anonymous>)
    at D:\Projects\STMng\node_modules\@vue\language-core\lib\virtualFile\computedFiles.js:150:24
    at D:\Projects\STMng\node_modules\computeds\out\computed.js:13:68
    at Tracker.track (D:\Projects\STMng\node_modules\computeds\out\tracker.js:43:20)
    at fn (D:\Projects\STMng\node_modules\computeds\out\computed.js:13:56)
    at D:\Projects\STMng\node_modules\@vue\language-core\lib\virtualFile\computedFiles.js:28:79
    at Array.map (<anonymous>)
    at D:\Projects\STMng\node_modules\@vue\language-core\lib\virtualFile\computedFiles.js:28:70
    at D:\Projects\STMng\node_modules\computeds\out\computed.js:13:68

Link to minimal reproduction

No response

Any additional comments?

The problem happens on various projects that had no problem before vue update. An issue have been opened (https://github.com/vuejs/core/issues/11196) against vue.

minenwerfer commented 1 week ago

I'm glad there's already an issue for this. Experiencing the same trying to use yaegassy/coc-volar in Neovim.

so1ve commented 1 week ago

vue tsc 5.5.2??

could you please check the latest version, does it work?

crystalfp commented 1 week ago

Opps, sorry. Have put here what is returned by vue-tsc --version Indeed, vue-tsc 2.0.22 works perfectly. Thanks!