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
Native DOM event type checking error since upgrading to 1.0.3 #1985
Comments
Same issue here |
For me it works after pinning |
Wow, it works. |
Also works for me. |
@ymy0622 are you sure this is a real solution and not a workaround before fix ? |
@ymy0622 I think you should leave this open. It's not really a desired workaround to pin |
同样的报错信息 |
1.0.3 继续报错,导致 vscode 里面报错,我的build 命令还用了 导致无法打包,只能把 vue-tsc 去掉 |
@bjornharrtell I'm trying to do the @types/node hotfix but still doesn't work... Any idea of how volar / vue-tsc infer DOM typings? or how the __VLS_types.ts file is generated? I'm stuck because of this |
@IagoLast make sure to put "@types/node": "18.8.0" and not "@types/node": "^18.8.0". |
thanks! |
when u done this , reopen the vscode
|
Still getting the same problem after changing the version of |
18.8.0 didn't work for me but 18.7.14 did. |
Works with |
Please track vuejs/core#6855 |
We can't fix this problem in language server, but we will have a doctor message to remind user downgrade |
Does it mean that it cannot be solved from vue-tsc? |
why is this issue closed but not yet fixed? |
I have the same problem. But I'm not using {
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"types": ["@vuepress/client/types"],
"importsNotUsedAsValues": "error",
"moduleResolution": "nodenext",
"preserveValueImports": true,
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"skipLibCheck": true,
"module": "esnext",
"target": "es2020",
"jsx": "preserve",
"allowJs": true,
"strict": true,
"baseUrl": ".",
"noEmit": true,
"paths": {
"~/components/*": ["./components/*"],
"~/typings/*": ["./typings/*"],
"~/assets/*": ["./assets/*"],
"~/pages/*": ["./pages/*"],
"~/icons/*": ["./icons/*"]
}
},
"include": ["**/*.ts", "**/*.vue"],
"exclude": ["node_modules"]
} |
It doesn't matter that you don't use it directly. Dependencies can install dependecies. Alternatively if you are using yarn use resolutions instead. E: As stated by @yah-yuan updating vue should fix the issue. |
seems vue@3.2.41 has been released and fixed this problem. I upgraded vue and @types/node to the latest, and the error no longer exists. |
Sadly this doesn't seem to be the case for many. v3.2.40...v3.2.41 shows no indication of any fix for this and the actual fix (vuejs/core#6855) is yet to be merged and released. |
Are you sure about that? Vue 3.2.41 hasn't fixed this issue. Is it possible your types/node in your lock is still pinned to 18.8.0 and you didn't really update it? I'm trying starting from scratch and as of right now with the latest everything, you still need that 18.8.0 pin |
Please wait for 3.2.42 and pin @types/node to 18.8.0 for now. :) |
Please also track DefinitelyTyped/DefinitelyTyped#62729 (Fix for next |
* chore(deps): update all non-major dependencies * chore: remove the lockfile and reinstall to update trnasitive deps The outdated `@types/babel__traverse` package is causing type errors * fix: fix htmlTags type error * fix: pin @types/node to 18.8.0 to work around vuejs/language-tools#1985 * fix: pin @vue/test-utils temporarily to avoid snapshot differences * test: update snapshot As far as I see, all the snapshot differences are merely the newlines after `import` statements * test: add `attachTo: document.body` to make click event take effect See vuejs/test-utils#1470 (comment) * fix: fix mjs processing for webpack 4 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
- Lock @types/node to 18.8.0 - Issue: vuejs/language-tools#1985
*🎉 Init Vue app *🔧 typescript-eslint の設定を強めにかけて型安全性を高める *🎨 prettier でフォーマットする *🩹 fix vuejs/language-tools#1985 *🧑💻 eslint/prettier を cache で高速化
But Volar |
@johnsoncodehk Shouldn't Volar have a new version disabling the doctor warning now? |
* chore(deps): update all non-major dependencies * chore: remove the lockfile and reinstall to update trnasitive deps The outdated `@types/babel__traverse` package is causing type errors * fix: fix htmlTags type error * fix: pin @types/node to 18.8.0 to work around vuejs/language-tools#1985 * fix: pin @vue/test-utils temporarily to avoid snapshot differences * test: update snapshot As far as I see, all the snapshot differences are merely the newlines after `import` statements * test: add `attachTo: document.body` to make click event take effect See vuejs/test-utils#1470 (comment) * fix: fix mjs processing for webpack 4 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
* chore(deps): update all non-major dependencies * chore: remove the lockfile and reinstall to update trnasitive deps The outdated `@types/babel__traverse` package is causing type errors * fix: fix htmlTags type error * fix: pin @types/node to 18.8.0 to work around vuejs/language-tools#1985 * fix: pin @vue/test-utils temporarily to avoid snapshot differences * test: update snapshot As far as I see, all the snapshot differences are merely the newlines after `import` statements * test: add `attachTo: document.body` to make click event take effect See vuejs/test-utils#1470 (comment) * fix: fix mjs processing for webpack 4 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
Native DOM event type checking error. (click, contextmenu, etc.)
vue@3.2.40
vite@3.1.7
vitejs/plugin-vue@3.1.2
vue-tsc@1.0.3
volar@1.0.3
I have deleted and installed yarn.lock + node_modules.
Type '() => void' is not assignable to type 'MouseEvent'.ts(2322)

__VLS_types.ts(107, 56): The expected type comes from property 'click' which is declared here on type 'EventObject<undefined, "click", {}, MouseEvent | undefined>'
The text was updated successfully, but these errors were encountered: