New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failed, error thrown #3345
Comments
Could you please provide a minimal reproduction? |
Unfortunately, I don't know what is causing the problem, but I managed to solve it for now by reverting to an older yarn. lock in my project. I suspect that some package is conflicting, but I'm not sure which one exactly. |
ReproductionSeems related to #2622 which has been closed, but this is still happening on latest Here is a reproduction: https://codesandbox.io/p/sandbox/vue-tsc-debug-failure-n6l43n?welcome=true If you run the This seems to be something to do with either WorkaroundCurrently we're using a pnpm patch to get around this: diff --git a/bin/vue-tsc.js b/bin/vue-tsc.js
--- a/bin/vue-tsc.js
+++ b/bin/vue-tsc.js
@@ -37,6 +37,9 @@ fs.readFileSync = (...args) => {
.map(file => file.replace(/\.vue\.(j|t)sx?$/i, '.vue'));\n` + s
);
}
+ if (semver.gte(tsPkg.version, '5.1.3')) {
+ tryReplace(`Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, "Paths must either both be absolute or both be relative");`, ``);
+ }
return tsc; |
From what I can tell, the problem stems from the filtering of filenames here:
This removes certain filenames from the internal list, which then clashes later when At least with When I remove the line above, i.e. do not filter out the VLS files, then the alignment seems to match again and the error goes away: diff --git a/packages/vue-tsc/bin/vue-tsc.js b/packages/vue-tsc/bin/vue-tsc.js
index f0c7776f..fc40dd93 100755
--- a/packages/vue-tsc/bin/vue-tsc.js
+++ b/packages/vue-tsc/bin/vue-tsc.js
@@ -33,7 +33,6 @@ fs.readFileSync = (...args) => {
tryReplace(
`return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host);`,
s => `buildInfo.program.fileNames = buildInfo.program.fileNames
- .filter(file => !file.toLowerCase().includes('__vls_'))
.map(file => file.replace(/\.vue\.(j|t)sx?$/i, '.vue'));\n` + s
);
} In my case the |
It's broken on vue-tsc again T_T See vuejs/language-tools#3345
same issue here, solve it with remove tsconfig.json {
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": [
"env.d.ts",
"src/**/*",
"src/**/*.vue"
],
"exclude": [
"src/**/__tests__/*"
],
"compilerOptions": {
- "composite": true,
"baseUrl": ".",
"types": [
"vite/client"
],
"paths": {
"@/*": [
"./src/*"
],
}
}
} |
When i'm trying to build my application with
vue-tsc --noEmit && vite build --emptyOutDir
I'm getting this error all the time:I've this error before, but usually running
yarn upgrade
helped, now it doesn't even help (probably no package is getting updated). I was trying to remove node_modules and yarn.lock but it's still not working.The text was updated successfully, but these errors were encountered: