While working on my development server, consistently a few minutes after having run netlify-dev I receive this error and am unable to call my functions until I kill node and restart netlify-dev, I am still able to access my website on port 3000 and make changes without any issues:
◈ Netlify Dev could not connect to localhost:3000.
◈ Please make sure your framework server is running on port 3000
This is really hampering my development and I can’t find a fix online. I am running Windows 10 21H1 and have netlify-lambda 2.0.15 and netlfiy-cli 9.2.0. My netlify.toml file is as follows:
I’ve had a similar issue using gatsby v3. Netlify dev starts the gatsby dev server, which finishes, but netlify dev doesn’t recognise that it is ready to start proxying requests. See here:
Seemed like this was fixed by upgrade the netlify cli but I had the same problem today with the latest version.
Obviously it would be helpful to upgrade gatsby to rule out issues but we can’t risk upgrading to v4 right now.
I am on Node (v16.13.2) and npm (8.1.2) with yarn (1.22.17) on a vite built web application.
I have found that it’s a “use it or lose it” sort of situation where 10 minutes or so of idle time (no requests made) the server will crash. It’s not always this way, as over time it eventually crashes immediately on a filechange. To be honest it’s hard to know the pattern other than the fact that it crashes with this error every single time without fail (eventually).
Interesting, I don’t think this is a dependency issue on the project itself, I started a new project with virtually zero dependencies and this was still occurring, so it must be my system. I tried disabling power-saving functionality related to network hardware but that did not yield any results either.
I have this same issue and have yet to look into it. I just accepted it as is, but now it’s enough of an inconvenience for me to dig into it. Repo is private unfortunately.
I’m aware of its’ long term support, but I need to build on 17 so sadly this solution won’t work for me. I’ll dig around when I have some time. Thank you for pointing me in the right direction!
Having the same time out issue with stopping Netlify dev server when 10 or so minutes passed.
I’m using Netlify dev server for functions and Vite as web server. netlify-cli/10.1.0 win32-x64 node-v17.3.0
Error message from Netlify dev server:
Netlify Dev could not connect to localhost:3000.
Please make sure your framework server is running on port 3000
whereas my website is accessible on localhost:3000.
The issue regarding Netlify CLI with v17 remains open on GitHub @bomzj(see links in previous posts.) At present the only option I am aware of is to downgrade to v16.