-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Svelte 5: Language server keeps crashing after updating passed 108.6.1 version of Svelte for VS code #2512
Comments
Can you provide your tsconfig? One of the changes in 109.0 is project reference support. Maybe you're using it and causing a lot more projects to be loaded than before. |
This is my project's tsconfig and the version is currently 108.6.1 {
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"sourceMap": true,
"strict": true,
"verbatimModuleSyntax": true
},
"exclude": ["../build/**"]
} and this the extended tsconfig {
"compilerOptions": {
"paths": {
"$constants": [
"../src/lib/constants"
],
"$constants/*": [
"../src/lib/constants/*"
],
"$components": [
"../src/lib/components"
],
"$components/*": [
"../src/lib/components/*"
],
"$lib": [
"../src/lib"
],
"$lib/*": [
"../src/lib/*"
],
"$routes": [
"../src/lib/routes"
],
"$routes/*": [
"../src/lib/routes/*"
],
"$styles": [
"../src/lib/styles"
],
"$styles/*": [
"../src/lib/styles/*"
],
"$theme": [
"../src/lib/theme"
],
"$theme/*": [
"../src/lib/theme/*"
],
"$types": [
"../src/lib/types"
],
"$types/*": [
"../src/lib/types/*"
],
"$actions": [
"../src/lib/actions"
],
"$actions/*": [
"../src/lib/actions/*"
],
"$utils": [
"../src/lib/utils"
],
"$utils/*": [
"../src/lib/utils/*"
],
"$assets": [
"../src/lib/assets"
],
"$assets/*": [
"../src/lib/assets/*"
]
},
"rootDirs": [
"..",
"./types"
],
"verbatimModuleSyntax": true,
"isolatedModules": true,
"lib": [
"esnext",
"DOM",
"DOM.Iterable"
],
"moduleResolution": "bundler",
"module": "esnext",
"noEmit": true,
"target": "esnext"
},
"include": [
"ambient.d.ts",
"non-ambient.d.ts",
"./types/**/$types.d.ts",
"../vite.config.js",
"../vite.config.ts",
"../src/**/*.js",
"../src/**/*.ts",
"../src/**/*.svelte",
"../tests/**/*.js",
"../tests/**/*.ts",
"../tests/**/*.svelte"
],
"exclude": [
"../node_modules/**",
"../src/service-worker.js",
"../src/service-worker.ts",
"../src/service-worker.d.ts"
]
} |
Although the exclude config is probably wrong it shouldn't be related. Is this tsconfig the one in your previous log? Or if there are other tsconfig? And if you run "npx tsc --showConfig" does it have any build files in the "files"? |
I'm not exactly sure what you mean, but if you mean this is the same tsconfig from when I post the error logs then that is true.
I'm pretty sure these two are the only tsconfig files of the project.
This is the result from the "files" when I run the command "files": [
"./.svelte-kit/ambient.d.ts",
"./.svelte-kit/non-ambient.d.ts",
"./.svelte-kit/types/src/routes/$types.d.ts",
"./.svelte-kit/types/src/routes/Accordion/$types.d.ts",
"./.svelte-kit/types/src/routes/Alert/$types.d.ts",
"./.svelte-kit/types/src/routes/Animations/$types.d.ts",
"./.svelte-kit/types/src/routes/Avatar/$types.d.ts",
"./.svelte-kit/types/src/routes/AvatarGroup/$types.d.ts",
"./.svelte-kit/types/src/routes/Button/$types.d.ts",
"./.svelte-kit/types/src/routes/Drawer/$types.d.ts",
"./.svelte-kit/types/src/routes/Select/$types.d.ts",
"./.svelte-kit/types/src/routes/Skeleton/$types.d.ts",
"./.svelte-kit/types/src/routes/SvelteElement/$types.d.ts",
"./.svelte-kit/types/src/routes/TabGroup/$types.d.ts",
"./.svelte-kit/types/src/routes/TextField/$types.d.ts",
"./.svelte-kit/types/src/routes/Transitions/$types.d.ts",
"./vite.config.ts",
"./src/lib/scripts/autoPush.js",
"./src/app.d.ts",
"./src/lib/index.ts",
"./src/lib/actions/collapse.ts",
"./src/lib/actions/focusTrap.ts",
"./src/lib/actions/forwardEventsBuilder.ts",
"./src/lib/actions/forwardInnerEvents.ts",
"./src/lib/actions/index.ts",
"./src/lib/actions/portalAction.ts",
"./src/lib/actions/useActions.ts",
"./src/lib/assets/index.ts",
"./src/lib/components/index.ts",
"./src/lib/components/Accordion/AccordionTypes.ts",
"./src/lib/components/Accordion/index.ts",
"./src/lib/components/AccordionGroup/AccordionGroupTypes.ts",
"./src/lib/components/AccordionGroup/index.ts",
"./src/lib/components/Alert/AlertTypes.ts",
"./src/lib/components/Alert/index.ts",
"./src/lib/components/Avatar/AvatarTypes.ts",
"./src/lib/components/Avatar/index.ts",
"./src/lib/components/AvatarGroup/AvatarGroupTypes.ts",
"./src/lib/components/AvatarGroup/index.ts",
"./src/lib/components/Badge/BadgeTypes.ts",
"./src/lib/components/Badge/index.ts",
"./src/lib/components/Button/ButtonTypes.ts",
"./src/lib/components/Button/index.ts",
"./src/lib/components/Card/CardTypes.ts",
"./src/lib/components/Card/index.ts",
"./src/lib/components/Checkbox/CheckboxTypes.ts",
"./src/lib/components/Checkbox/index.ts",
"./src/lib/components/CircularProgress/CircularProgressTypes.ts",
"./src/lib/components/CircularProgress/index.ts",
"./src/lib/components/Collapse/CollapseTypes.ts",
"./src/lib/components/Collapse/index.ts",
"./src/lib/components/Dialog/DialogTypes.ts",
"./src/lib/components/Dialog/index.ts",
"./src/lib/components/Divider/DividerTypes.ts",
"./src/lib/components/Divider/index.ts",
"./src/lib/components/Drawer/DrawerTypes.ts",
"./src/lib/components/Drawer/index.ts",
"./src/lib/components/LinearProgress/LinearProgressTypes.ts",
"./src/lib/components/LinearProgress/index.ts",
"./src/lib/components/Modal/ModalTypes.ts",
"./src/lib/components/Modal/index.ts",
"./src/lib/components/Pagination/PaginationTypes.ts",
"./src/lib/components/Pagination/index.ts",
"./src/lib/components/Pagination/usePagination.ts",
"./src/lib/components/PersistentDrawer/PersistentDrawerTypes.ts",
"./src/lib/components/PersistentDrawer/index.ts",
"./src/lib/components/Popper/PopperTypes.ts",
"./src/lib/components/Popper/index.ts",
"./src/lib/components/Provider/index.ts",
"./src/lib/components/Radio/RadioTypes.ts",
"./src/lib/components/Radio/index.ts",
"./src/lib/components/RadioGroup/RadioGroupTypes.ts",
"./src/lib/components/RadioGroup/index.ts",
"./src/lib/components/Ripple/RippleTypes.ts",
"./src/lib/components/Ripple/index.ts",
"./src/lib/components/Select/SelectTypes.ts",
"./src/lib/components/Select/index.ts",
"./src/lib/components/SelectGroup/SelectGroupTypes.ts",
"./src/lib/components/SelectGroup/index.ts",
"./src/lib/components/SelectOption/SelectOptionType.ts",
"./src/lib/components/SelectOption/index.ts",
"./src/lib/components/ShareDrawer/index.ts",
"./src/lib/components/Skeleton/SkeletonTypes.ts",
"./src/lib/components/Skeleton/index.ts",
"./src/lib/components/Stack/StackTypes.ts",
"./src/lib/components/Stack/index.ts",
"./src/lib/components/SvelteComponent/SvelteComponentTypes.ts",
"./src/lib/components/SvelteComponent/index.ts",
"./src/lib/components/SvelteElement/SvelteElementTypes.ts",
"./src/lib/components/SvelteElement/index.ts",
"./src/lib/components/Switch/SwitchTypes.ts",
"./src/lib/components/Switch/index.ts",
"./src/lib/components/Tab/TabTypes.ts",
"./src/lib/components/Tab/index.ts",
"./src/lib/components/TabGroup/TabGroupTypes.ts",
"./src/lib/components/TabGroup/index.ts",
"./src/lib/components/Table/TableTypes.ts",
"./src/lib/components/Table/index.ts",
"./src/lib/components/Table/TBody/TBodyTypes.ts",
"./src/lib/components/Table/TBody/index.ts",
"./src/lib/components/Table/TCell/TCellTypes.ts",
"./src/lib/components/Table/TCell/index.ts",
"./src/lib/components/Table/TFoot/TFootTypes.ts",
"./src/lib/components/Table/TFoot/index.ts",
"./src/lib/components/Table/THead/THeadTypes.ts",
"./src/lib/components/Table/THead/index.ts",
"./src/lib/components/Table/TRow/TRowTypes.ts",
"./src/lib/components/Table/TRow/index.ts",
"./src/lib/components/Table/TableColumnsFilter/TableColumnsFilterTypes.ts",
"./src/lib/components/Table/TableColumnsFilter/index.ts",
"./src/lib/components/TablePagination/index.ts",
"./src/lib/components/Tag/index.ts",
"./src/lib/components/TextField/TextFieldTypes.ts",
"./src/lib/components/TextField/index.ts",
"./src/lib/components/TextFieldAdornment/TextFieldAdornmentTypes.ts",
"./src/lib/components/TextFieldAdornment/index.ts",
"./src/lib/components/Tooltip/index.ts",
"./src/lib/constants/context.ts",
"./src/lib/constants/index.ts",
"./src/lib/constants/theme.ts",
"./src/lib/hooks/handleBindableProp.svelte.ts",
"./src/lib/hooks/handleResponsiveProps.svelte.ts",
"./src/lib/hooks/handleResponsivePropsWithProxy.svelte.ts",
"./src/lib/hooks/transitionAnimationManager.svelte.ts",
"./src/lib/hooks/transitionAnimationTrigger.svelte.ts",
"./src/lib/hooks/useEffect.ts",
"./src/lib/hooks/useId.ts",
"./src/lib/styles/designs/chattyAi.ts",
"./src/lib/theme/createTheme.ts",
"./src/lib/theme/defaultThemes.ts",
"./src/lib/theme/index.ts",
"./src/lib/types/utils.d.ts",
"./src/lib/types/context/index.d.ts",
"./src/lib/types/csstype/csstype.d.ts",
"./src/lib/types/props/index.d.ts",
"./src/lib/types/theme/ZIndex.d.ts",
"./src/lib/types/theme/breakpoints.d.ts",
"./src/lib/types/theme/index.d.ts",
"./src/lib/types/theme/palette.d.ts",
"./src/lib/types/theme/portals.d.ts",
"./src/lib/types/theme/propsDefaultValues.d.ts",
"./src/lib/types/theme/shadows.d.ts",
"./src/lib/types/validElements/index.ts",
"./src/lib/utils/chooseBreakpoint.ts",
"./src/lib/utils/color.ts",
"./src/lib/utils/functions.ts",
"./src/lib/utils/handleContainerProp.svelte.ts",
"./src/lib/utils/handleContainerPropWithProxy.svelte.ts",
"./src/lib/utils/handleRestStyles.ts",
"./src/lib/utils/handleStyleObjectOrFunction.ts",
"./src/lib/utils/index.ts",
"./src/lib/utils/merge.ts",
"./src/lib/utils/moveFocusFrom.ts",
"./src/lib/utils/scroll.ts",
"./src/lib/utils/theme.ts",
"./src/lib/utils/undoStack.ts",
"./src/routes/+layout.server.ts"
], |
That all seems normal. Can you provide the package.json? Maybe for some reason, an icon library now loads Svelte files instead of d.ts files or something? |
This is the content of my package.json {
"name": "yapitui",
"version": "0.58.0",
"license": "MIT",
"scripts": {
"dev": "vite dev",
"build": "vite build && npm run package && npm run post",
"post": "node scripts/post-build.js",
"preview": "vite preview",
"package": "svelte-kit sync && svelte-package && publint",
"prepublishOnly": "npm run package",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
},
"files": [
"*"
],
"dependencies": {
"@ctrl/tinycolor": "^4.1.0",
"@floating-ui/core": "^1.6.1",
"@formkit/auto-animate": "^0.8.2",
"focus-trap": "^7.5.4",
"svelte-floating-ui": "^1.5.5"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.2.0",
"@sveltejs/kit": "^2.5.7",
"@sveltejs/package": "^2.3.1",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.17.1",
"@types/mousetrap": "^1.6.15",
"@types/node": "^20.12.11",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"csstype": "^3.1.3",
"eslint": "^9.2.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.38.0",
"fs-extra": "^11.2.0",
"js-cookie": "^3.0.5",
"lodash": "^4.17.21",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.3",
"publint": "^0.2.7",
"sass": "^1.77.0",
"svelte": "^5.0.0-next.258",
"svelte-check": "^3.8.0",
"svelte-inspector": "^0.0.3",
"svelte-preprocess": "^5.1.4",
"svelte-preprocess-cssmodules": "^2.2.4",
"tslib": "^2.6.2",
"type-fest": "^4.18.2",
"typescript": "^5.5.3",
"vite": "^5.2.11"
},
"type": "module"
} |
Yeah. Sadly, I still can't reproduce with the info you provide and I am running out of ideas. We'll need a reproduction to help you. You can try gradually moving stuff to an empty SvelteKit project until the problem appears. The last out-of-memory report ends up being caused by library-generated code. If you have something similar I would suggest you start from there. |
Quick fix / import suggestions constantly break for me in VS Code. Sometimes restarting Svelte language server fixes it, but many times it does not. |
Describe the bug
After updating to 109.0.0 version of Svelte for VS code. suddenly the language server keeps freezing and crashes after a while.
I couldn't recreate this issue in a new Svelte project and it only happens on a big project that has considerable amount of .svelte and .ts files in it. I think the only useful thing I can supply is the error output below.
Reproduction
No Reproduction.
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: