Development server keeps crashing


I know this has probably been mentioned many times. The error I get is res.WriteHead is not a function. I used to get this error before when I would have localhost opened in more than one browser. I resolved that issue simply by running only one instance of the app. Now, every time I make a change to the code while the Netlify development server is running, the server crashes with for-mentioned error.

So, the site is not deployed, running it locally.

Here is the complete log I get:

I haven’t noticed server crashing while using the app, only when I make changes to the code. Any ideas?

It’s not really that big of an issue, but it gets annoying to have to run the server over and over again.

What version of the CLI are you using?

Version of the cli is 15.1.0

Please open an issue on CLI repo. Here’s one related: Browser session doesn’t recover after edge function failure · Issue #5676 · netlify/cli (

Submitted issue on CLI repo:

I am using VS Code, and so I thought maybe the issue is related to the editor.
Tried running development server in separate CMD window, issue persists.
I let it re-compile without switching between windows or opening browser, it would still crash.
Sometimes it compiles, but then it crashes immediately afterwards.
I run it again, it compiles and again it crashes.

Basically, it keeps crashing all the time and I think it has something to do with client side, because if I only load the Netlify function in the browser, it doesn’t crash upon changes.

Hey @fadingbeat,

I have pinged the devs internally. However, I’m not sure if/when they will take a look at this issue. CLI-issues are not handled by Support, so I’ll leave it for the devs to decide when they wish to take this up and investigate. Any follow-ups would mostly happen in that issue.

1 Like