language-tools: vue-tsc doesn't work with typescript 5.7.2
Vue - Official extension or vue-tsc version
2.1.10
VSCode version
none
Vue version
3.5.13
TypeScript version
5.7.2
System Info
System:
OS: Windows 11 10.0.26100
CPU: (16) x64 AMD Ryzen 7 6800H with Radeon Graphics
Memory: 9.81 GB / 31.21 GB
Binaries:
Node: 20.15.0 - C:\Program Files\nodejs\node.EXE
npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.13.2 - ~\AppData\Local\pnpm\pnpm.EXE
Browsers:
Edge: Chromium (129.0.2792.79)
Internet Explorer: 11.0.26100.1882
package.json dependencies
{
"dependencies": {
"@fontsource-variable/jetbrains-mono": "^5.1.1",
"@guolao/vue-monaco-editor": "^1.5.4",
"@vue-js-cron/naive-ui": "^2.0.9",
"@vueuse/core": "^11.3.0",
"@xterm/addon-attach": "^0.11.0",
"@xterm/addon-clipboard": "^0.1.0",
"@xterm/addon-fit": "^0.10.0",
"@xterm/addon-unicode11": "^0.8.0",
"@xterm/addon-web-links": "^0.11.0",
"@xterm/addon-webgl": "^0.18.0",
"@xterm/xterm": "^5.5.0",
"alova": "^3.2.4",
"axios": "^1.7.7",
"cronstrue": "^2.52.0",
"echarts": "^5.5.1",
"install": "^0.13.0",
"lodash-es": "^4.17.21",
"luxon": "^3.5.0",
"marked": "^15.0.2",
"mitt": "^3.0.1",
"pinia": "^2.2.6",
"pinia-plugin-persistedstate": "^4.1.3",
"remove": "^0.1.5",
"vue": "^3.5.13",
"vue-echarts": "^7.0.3",
"vue-i18n": "^10.0.4",
"vue-router": "^4.4.5"
},
"devDependencies": {
"@iconify/json": "^2.2.275",
"@iconify/vue": "^4.1.2",
"@rushstack/eslint-patch": "^1.10.4",
"@tsconfig/node20": "^20.1.4",
"@types/lodash-es": "^4.17.12",
"@types/luxon": "^3.4.2",
"@types/node": "^22.9.1",
"@unocss/eslint-config": "^0.64.1",
"@vitejs/plugin-vue": "^5.2.0",
"@vue/eslint-config-prettier": "^10.1.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.6.0",
"colord": "^2.9.3",
"eslint": "^8.57.1",
"eslint-plugin-vue": "^9.31.0",
"md-editor-v3": "^5.0.2",
"monaco-editor": "^0.52.0",
"naive-ui": "^2.40.1",
"npm-run-all2": "^7.0.1",
"prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^4.1.0",
"sass": "^1.81.0",
"typescript": "^5.7.2",
"unocss": "^0.64.1",
"unplugin-auto-import": "^0.18.5",
"unplugin-icons": "^0.20.1",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.4.11",
"vite-plugin-html": "^3.2.2",
"vite-plugin-mock": "^3.0.2",
"vite-plugin-static-copy": "^2.1.0",
"vue-tsc": "^2.1.10"
}
}
Steps to reproduce
update typescript to 5.7.2
What is expected?
no error
What is actually happening?
throw error:
C:\path\to\project\node_modules\.pnpm\vue-tsc@2.1.10_typescript@5.7.2\node_modules\vue-tsc\index.js:34
throw err;
^
Search string not found: "/supportedTSExtensions = .*(?=;)/"
(Use `node --trace-uncaught ...` to show where the exception was thrown)
Node.js v20.15.0
ELIFECYCLE Command failed with exit code 1.
ERROR: "type-check" exited with 1.
ELIFECYCLE Command failed with exit code 1.
Link to minimal reproduction
No response
Any additional comments?
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 207
- Comments: 36 (1 by maintainers)
Commits related to this issue
- Upgrade dependencies, fix lint errors * Upgrade to Marked 15 * Upgrade to ESLint 9 and typescript-eslint 8 * Stay on TypeScript 5.6 because of an issue with vue-tsc with TS 5.7: https://github.com/... — committed to jack126guy/fitbhost by jack126guy 2 years ago
- chore: pin typescript https://github.com/vuejs/language-tools/issues/5018 — committed to danielroe/roe.dev by danielroe 2 years ago
- Update FE libs Stay on old typescript version (5.6.3) as the latest is not compatible to vue-tsc 2.2.10 (https://github.com/vuejs/language-tools/issues/5018) RISDEV-0000 — committed to digitalservicebund/ris-backend-service by anne-ds 2 years ago
- chore: pin typescript - vuejs/language-tools#5018 — committed to vue-zone/vue3-vant-mobile by CharleeWa 2 years ago
- Patch `vue-tsc` Ref: https://github.com/vuejs/language-tools/issues/5018#issuecomment-2496477820 — committed to n8n-io/n8n by ivov 2 years ago
- build: fix vue-tsc issue https://github.com/vuejs/language-tools/issues/5018 — committed to qoomon/yolo-secret by qoomon 2 years ago
- Update frontend non-major dependencies and pin ts Since vue-tsc does not (yet) work with newer typescript versions, the typescript version was pinned to '5.6.3' for now. For more information see http... — committed to digitalservicebund/ris-backend-service by elaydis 2 years ago
- Fix vue-tsc https://liubing.me/article/vue/search-string-not-found-supported-ts-extensions.html https://github.com/vuejs/language-tools/issues/5018 — committed to Huaqiu-Electronics/huaqiu-electronics.github.io by liangtie 2 years ago
- chore(deps): update `typescript & vue-tsc` and fixate version Due to a bug in `vue-tsc` versions have to be fixed. See: https://github.com/vuejs/language-tools/issues/5018#issuecomment-2504556038 — committed to gobitfly/beaconchain by marcel-bitfly 2 years ago
- chore(deps): update `typescript & vue-tsc` and fixate version Due to a bug in `vue-tsc` versions have to be fixed. See: https://github.com/vuejs/language-tools/issues/5018#issuecomment-2504556038 — committed to gobitfly/beaconchain by marcel-bitfly 2 years ago
- pin typescript See: vuejs/language-tools#5018 — committed to MoomFE/mixte by Zhang-Wei-666 2 years ago
- chore(deps): update all non-major dependencies (#143) * chore(deps): update all non-major dependencies * pin typescript See: vuejs/language-tools#5018 --------- Co-authored-by: renovate[b... — committed to MoomFE/mixte by renovate[bot] 2 years ago
- build(deps): 回退ts版本 https://github.com/vuejs/language-tools/issues/5018 — committed to janeywong/HINEW by janeywong 2 years ago
- fix: remove vue-tsc in build script https://github.com/vuejs/language-tools/issues/5018 — committed to ArcherGu/fast-vite-electron by ArcherGu 2 years ago
- Fix lint error esp. https://github.com/vuejs/language-tools/issues/5018 — committed to nyanrus/Twitter-UI-Customizer by nyanrus 2 years ago
- Revert "ui: bump typescript from 5.6.3 to 5.7.2 in /ui" This reverts commit ee2c3c7a2460d7dddb238e030ef5732d04478f49. See: https://github.com/vuejs/language-tools/issues/5018 — committed to shellhub-io/shellhub by gustavosbarreto 2 years ago
- Revert "ui: bump typescript from 5.6.3 to 5.7.2 in /ui" This reverts commit ee2c3c7a2460d7dddb238e030ef5732d04478f49. See: https://github.com/vuejs/language-tools/issues/5018 — committed to shellhub-io/shellhub by gustavosbarreto 2 years ago
- 修复·临时 vue-tsc 兼容问题 https://github.com/vuejs/language-tools/issues/5018#top — committed to Qiu-Quanzhi/Qiu-Quanzhi by Qiu-Quanzhi 2 years ago
- chore: pin typescript to v5.6 https://github.com/vuejs/language-tools/issues/5018 — committed to danielroe/emoji-blast by danielroe 2 years ago
- Temporarily downgrade `typescript` to `~5.6.3` vue-tsc <= 2.1.10 has some issues with TypeScript 5.7. See: https://github.com/vuejs/language-tools/issues/5018 — committed to ThrRip/mzg.fan by ThrRip 2 years ago
We’ve now landed the compatibility fix in master. To use this fix in your codebase, until we’ve released the next version, please point
vue-tscto:pnpm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@3fb59afCan we reopen this issue until the patch has been released?
Sorry for the delay, I am currently no longer able to maintain this project full time. Since the next version depends on some Volar.js updates, I’ll be working on the backlog here once the next Volar.js version is completed and released.
This project currently relies heavily on the developers I’m sponsoring to work on in their spare time. If you would like to help keep this project sustainable, please consider joining the insiders program, where we aim to support at least one part-time developer.
Fixed in https://github.com/vuejs/language-tools/pull/5020. Released in 2.2.0.
Are there any plans to do a patch release for this anytime soon? I don’t think vue-tsc@3fb59af is a viable option…
I am experiencing the same problem when using vue-tsc version 2.1.10 with TypeScript 5.7.2. The error occurs when running the build script using pnpm
To resolve this issue temporarily, I had to downgrade:
Here is the updated portion of my package.json after the downgrade:
This downgrade fixed the issue. It appears to be related to an incompatibility between vue-tsc@2.1.10 and TypeScript 5.7.x.
Excatly same error message, tried 2.1.6 and 2.1.10
Same
I wanted to share that, as a palliative solution, I resolved the issue by using these specific versions in my package.json without the ^ at the beginning:
After making this change, the problem stopped occurring for me. Hope this helps as a temporary workaround!
I submitted an issue on Volar’s repository. After a bunch of digging in
node_modulesI figured out the exact cause of the issue. If I’d seen this issue thread earlier, I probably would have just downgraded my Typescript version and moved on, but since I know what’s going on now, I’m hoping to submit a PR to get things fixed on their side.Same issue. Any news or release date of the fix ?
I found the issue, Typescript was updated 1 hour ago to version 5.7.2.
For me, version 5.6.2 is working.
The incompatibility appears to be in the Volar repo, specifically where @volar/typescript patches the tsc code, because the tsc code changed with the typescript 5.7 release.
I was a little late to the Vue ecosystem and I haven’t followed the Volar discussion, so I’m not 100% sure, but I believe Volar is a standalone project now. I’m wondering if this issue may be more appropriately handled over there, since Volar supports other TypeScript-based languages that are impacted by this issue. I searched the issues there, and didn’t find anything yet, but it may just be that fresh, since TypeScript 5.7.2 is only about 5 hours old.
In the mean time, pinning TypeScript at 5.6.3 and allowing vue-tsc to go to 2.1.10 works for me.
I put up a PR for a fix. The changes worked for me in my testing. Hopefully, we can get this merged in and unblock Typescript upgrades.
Same issue with latest version of these deps.
It is working fine with deno 2.x
same issue here, i just rolled back my package-lock.json for now
Volar expects to replace or give error when the pattern is not found.
https://github.com/volarjs/volar.js/blob/3e996b3a4c435ccd52b1ce681f603af08df123d4/packages/typescript/lib/quickstart/runTsc.ts#L107-L115
As already mentioned by sminnee, this breaking change occurred because beacause tsc.js < @5.6 exported everything:
And now is under _tsx.js.
The change in typescript was made from this PR:
https://github.com/microsoft/TypeScript/pull/59720
https://github.com/jakebailey/TypeScript/blob/b3c67d32020a3015fe068fbcb1dcfb18aedcaad3/Herebyfile.mjs#L320-L345
https://github.com/vuejs/language-tools/pull/5020 is a good one!
works fine.
Also, if your
vue - officialextension does not recognize types properly you can downgrade to2.1.10same here
“vue-tsc”: “1.8.27”,
and
“typescript”: “5.3.3”,
can resolve this problem.
https://github.com/vuejs/language-tools/pull/5020 will resolve this issue. In the meantime, please use
pnpm patch vue-tsc@2.1.10and follow @sminnee’s comment to update language-tools/packages/tsc/index.tsThis has a huge impact. When will the version be released to solve this problem?
I second @amir20 that we reopen this issue.
I experinced this issue with nuxt and was able to get around it by disabling the typescript.typecheck in the nuxt config.
JFYI: Typescript 5.6.3 and vue-tsc 2.0.0 works as well.
At https://github.com/vuejs/language-tools/blob/cf70eda2c40c33e2458b09d6dcac0c5f3615067d/packages/tsc/index.ts#L6 the file
typescript/lib/tsc.jsis referenced.This file is now
typescript/lib/_tsc.js, because the former file is now just a shim.To work in all typescript versions, it would need to apply the transformations on both
typescript/lib/tsc.jsandtypescript/lib/_tsc.js, and avoid throwing an error if the search text isn’t found.It might be worth updating https://github.com/volarjs/volar.js/blob/master/packages/typescript/lib/quickstart/runTsc.ts#L11 to:
string[]or astringfor the tscPath.Has there been any attempts to contribute the changes that
vue-tscto the officialtsc? React JSX also works out of the box intsc, so why can’t Vue SFCs too?Thanks