- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 432
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
Throw an error when composite
is enabled
#2622
Comments
I'm encountering the same issue |
i am getting the same error with |
I have the same error with version
The error still exists in In version Update: For some reason the version |
I have the same error: Running
"devDependencies": {
"@tsconfig/node18": "^2.0.0",
"@types/node": "^18.16.2",
"@vitejs/plugin-vue": "^4.2.1",
"@vue/tsconfig": "^0.3.2",
"typescript": "~5.0.4",
"vite": "^4.3.3",
"vue-tsc": "^1.6.1"
} |
This is also blocking us from upgrading. Contents of tsconfig: {
"compilerOptions": {
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "node",
"lib": [
"DOM",
"ESNext",
"DOM.Iterable"
],
"baseUrl": ".",
"rootDir": "src",
"strict": true,
"alwaysStrict": true,
"isolatedModules": true,
"importsNotUsedAsValues": "error",
"useDefineForClassFields": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strictNullChecks": true,
"noImplicitThis": true,
"strictPropertyInitialization": true,
"forceConsistentCasingInFileNames": true,
"jsx": "preserve",
"declaration": true,
"declarationMap": true,
"declarationDir": "dist",
"outDir": "dist",
"sourceMap": true,
"composite": true,
"types": [
"vite/client",
"vitest"
]
},
"paths": {
"@apps/*": [
"apps/*/src"
],
"@packages/*": [
"packages/*/src"
]
},
"exclude": [
"node_modules"
],
} |
I found that the error was a type error, but the |
@FabianMontoya That's interesting, though it wouldn't explain why there is suddenly a type error to begin with after upgrading to the newer version. Do you remember what the type error was that you fixed? Perhaps it would give us an indication of where to look. |
It was a error in a |
Fixes vuejs#2622 I don't know the exact detail of the crash, but I find that tsc crashed because the `diagnostic.file` object is somehow missing a `resolvedPath` field. Meanwhile, the `fileName` field is always present. So I just added a fallback to `fileName` in the patch. Maybe related: microsoft/TypeScript#54057 I only add it to the 5.0 branch because I haven't tested it on 4.x, so let's play it safe.
Fixes #267 Thanks @segevfiner for noticing this new feature! Currently there's still a small annoyance that `vue-tsc` would output an extra error message when there're type errors in `.vue` files vuejs/language-tools#2622 But it works well if there's no error. I've already submitted a PR to address it vuejs/language-tools#3176
I can confirm the report by @FabianMontoya and add some more information. In our own project, when we set |
@Ragura Thank you for sharing that piece of information. In my case, changing |
Same behaviour here :) |
Reproduction: https://github.com/sxzz/volar-starter/commit/e83eb070283dc0c06692b5d1bf7c4e486419e559
The text was updated successfully, but these errors were encountered: