Open devhaozi opened 4 days ago
Excatly same error message, tried 2.1.6 and 2.1.10
Same here, in my local works but not in the CD pipeline 🤔
I found the issue, Typescript was updated 1 hour ago to version 5.7.2.
For me, version 5.6.2 is working.
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
/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 = .*(?=;)/"
Node.js v22.11.0
To resolve this issue temporarily, I had to downgrade:
Here is the updated portion of my package.json after the downgrade:
{
"scripts": {
"build": "vue-tsc -b && vite build"
},
"devDependencies": {
"vue-tsc": "2.0.29",
"typescript": "5.6.2",
"vite": "^5.4.10",
"@vitejs/plugin-vue": "^5.1.4"
}
}
This downgrade fixed the issue. It appears to be related to an incompatibility between vue-tsc@2.1.10 and TypeScript 5.7.x.
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.
same here
At https://github.com/vuejs/language-tools/blob/cf70eda2c40c33e2458b09d6dcac0c5f3615067d/packages/tsc/index.ts#L6 the file typescript/lib/tsc.js
is 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.js
and typescript/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 a string
for the tscPath.This has a huge impact. When will the version be released to solve 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.10
and follow @sminnee's comment to update language-tools/packages/tsc/index.ts
Thanks
Nothing helped. I still get the same error even after downgrading the mentioned packages. Another solution with a patch is not clear. I can't find this file, and I don't use ppm. I just building without vue-tsc "build": "vite build && vite build --ssr",
temporary.
I use this command npx --yes -p vue-tsc@2.1.2 --yes -p typescript@5.6.2 vue-tsc --noEmit --skipLibCheck
and it works fine on my local server.
But it continues falling with the same error on pipeline in gitlab. I'm confused, everything worked fine until this Monday..
/root/.npm/_npx/4e06f8b322b12674/node_modules/vue-tsc/index.js:45
throw err;
^
Search string not found: "/supportedTSExtensions = .*(?=;)/"
At
the file
typescript/lib/tsc.js
is referenced. This file is nowtypescript/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.js
andtypescript/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:
- accept either a
string[]
or astring
for the tscPath.- accept an option to disable 'search text not found' errors.
I was able to fix this issue by changing the lib path which is now different, like above comment described. Why this sudden change I cant figure out
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
Steps to reproduce
update typescript to 5.7.2
What is expected?
no error
What is actually happening?
throw error:
Link to minimal reproduction
No response
Any additional comments?
No response