Closed susanne99 closed 2 years ago
This happens to me when I upgrade Typescript from 4.7.x (4.7.4) to 4.8.x (4.8.3)
No idea if it has anything to do that I am using "vue-property-decorator" to write my components.
i use VUE2 with typescript, and i wrote all my componennts for example like this:
<script lang="ts">
import Vue, { PropType } from 'vue'
import { mapState, mapActions, mapGetters } from 'vuex'
import savebuttongroup from '../Common/SaveButtonGroup.vue'
interface iformdata {
id: number;
to: string;
cc: string;
}
export default Vue.extend({
name: 'email_edit',
components: { savebuttongroup },
props: {
title: String,
},
});
</script>
so, what i tried for the example component above, i remove the "savebuttongroup" from "components" property, like this: components: { },
and vola, the VLS (vue language server) restarts without error. okay, then we can say, the bug is in the component "savebuttongroup" - i removed all typescript code, all watchers, all "template-code", i made an almost empty "savebuttongroup" component - but the VLS error still occurs. Therefore, i have no idea anymore, what the problem is.
for myself, i think it has maybe nothing to do with the vetur itself, because i installed a 1 year old vetur version, and the error is the same. I think it has todo with VSCode Version.
What i not really understand is, that not more people have this problem !
Please, Vetur Team, HELP, without the VLS Server it is not really fine to develop vue app's.
@susanne99 which Typescript version are you running?
Please check in vs code:
Hi Cyclodex, thanks for your helping!
tsconfig.json:
{
"compilerOptions": {
"allowJs": false,
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules",
"vendor"
]
}
"Select Typescript Version":
I use VSCode Version: 4.8.2
I don't use Workspace Version: 4.1.6
I tried to use the workspace Version - the problem still exists
I can't imagine that nobody has this problem
I mean, a recursion error with max. call stack size exceeded cannot only effect me.
.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60715 function instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments) { ^
RangeError: Maximum call stack size exceeded at instantiateTypeWorker (c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60715:39) at instantiateTypeWithAlias (c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60711:26) at instantiateType (c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60694:37)
I was facing the same problem in one of my nuxt projects (We will call this X project). Luckily I had other nuxt projects in my computer in which Vetur was working perfectly fine.
After digging a lot and wasting a lot of time on this issue. Some how I came to know that X project had vue v2.7.13 in package-lock.json
and other projects had vue v2.6.12. So I copy and pasted package-lock.json
from another nuxt project into X project's package-lock.json
removed node_modules
, ran npm i
and then the issue was resolved and Vetur started working perfectly fine.
My guess is I might had different vue versions across different dependencies.
Please have a look at this and verify your project's package-lock.json
Thanks.
hi,
thanks fpr the tip !
meanwhile i stopped the investigation and use from now on volar.
it works, but sometimes (very little) i monitored also a stack overflow error - then i restart VS-Code and the error has gone !
the general problem is,
each provider has its own system, e.g. typescript translator, you can use the one from VSCode or the one from VUE or a third party, and so on
kind regards
Gesendet: Samstag, 22. Oktober 2022 um 14:58 Uhr Von: "Ahmad Javaid" @.> An: "vuejs/vetur" @.> Cc: "susanne99" @.>, "Mention" @.> Betreff: Re: [vuejs/vetur] VUE Language Server crashed 5 times in the last 3 minutes (Issue #3520)
I was facing the same problem in one of my nuxt projects (We will call this X project). Luckily I had other nuxt projects in my computer in which Vetur was working perfectly fine.
After digging a lot and wasting a lot of time on this issue. Some how I came to know that X project had vue v2.7.13 in package-lock.json and other projects had vue v2.6.12. So I copy and pasted package-lock.json from another nuxt project into X project's package-lock.json remove node_modules, ran npm i and then the issue was resolved and Vetur started working perfectly fine.
My guess is I might had different vue versions across different dependencies.
Please have a look at this and verify your project's package-lock.json
Thanks.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Vetur is broken in typescript 4.8. I will fix it.
Hey @susanne99 I have almost exactly the same issue as you do, after a lengthy investigation found that if I removed
"@types/vuelidate": "^0.7.15", the range error maximum callstack size exceeded no longer happens.
I got declaration missing and other expected validation errors in components where vuelidate is present, which is in the dozens of places for me , but the build does not fail. it will take some time to make the update but hopefully thats is it.
Suggestion:
Try updating vuelidate to @vuelidate/core v2.0.0
https://vuelidate-next.netlify.app/ after that update vue-template-compiler to 2.7.14
@platformlead Thanks for your comment, our app is also using vuelidate and removing its types package solved everything!
Vetur: Restart VLS
Info
Problem
The errror occurs on some .vue files, not on all. I have no idea what the reason is, i tried almost everything: i reduced step by step the code of such a failed .vue file, but the vls server restart takes a long time, which makes the error investigation very heavy ! I checked the folder structure, e.g. same file name like folder name (maybe this creates end endless loop), i renamed, copied files and so on - nothing helped !! Vetur is a very important tool for me, and I and other developer need it really for developing stable software. Maybe is "VOLAR" the right plugin, but my program exists since 3 years (VUE2 with about 100 files), and i don't want to change it like VOLAR spec. I reinstalled also VETUR, no success
Vetur initialized [INFO ] Loaded bundled typescript@4.4.4. [INFO ] Loaded bundled prettier. [INFO ] Loaded bundled @starptech/prettyhtml. [INFO ] Loaded bundled prettier-eslint. [INFO ] Loaded bundled prettier-tslint. [INFO ] Loaded bundled stylus-supremacy. [INFO ] Loaded bundled @prettier/plugin-pug. [Error - 06:47:41] Request textDocument/semanticTokens/range failed. Message: Request textDocument/semanticTokens/range failed with message: Maximum call stack size exceeded Code: -32603 c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60473 function getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) { ^
RangeError: Maximum call stack size exceeded at getObjectTypeInstantiation (c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60473:44) at instantiateTypeWorker (c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60736:28) at instantiateTypeWithAlias (c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60716:26) at instantiateType (c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60699:37) at instantiateList (c:\Users\Wolfgang.vscode\extensions\octref.vetur-0.36.0\server\node_modules\typescript\lib\typescript.js:60323:34)
Reproducible Case
Not Reproducable
My Package.json