Deno language server no longer starting. "Fatal JavaScript out of memory: Reached heap limit" error
I'm encountering an issue wherein the deno language server keeps crashing for some reason and I can't seem to figure out why
9 Replies
Is your project publicly available so that we can reproduce the error?
The server is probably loading too much code running out of available memory - you can try excluding some directories with
deno.excludePaths
settingI checked it out. It seems like something is up with that canary version of zod you're using. It's causing the typescript compiler to run out of memory while trying to check types. I tried with the normal TS server as well and it also crashed with OOM.
Switching to latest released version of zod (non canary) seems to work fine
Sorry unfortunately it isn't :(
@nathanwhit out of curiosity and for my learning, how do you tell that a canary version of zod is used based on just those traces?
Ah sorry, I thought this was the same as https://github.com/denoland/deno/issues/29881. I see now it’s a different issue, my bad!
GitHub
denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.
No, that makes perfect sense! We do use
zod
and currently using zod/v4
, so it's possible that it's related! I thought there is away to tell in those traces that I'm no aware of and was super curious! 😆
Maybe another data point for you: I'm on 2.3.7, macOS Sequoia 15.5, VS Code 1.101.1 and my Deno language has been fine with zod/v4
.Hello! Just to update, I have found a temporary fix by just lowering
deno.documentPreloadLimit
in vscode!