ECONNRESET immediately on netlify dev with Astro projects
Describe the bug
Running netlify dev on a new installation of macOS (26.0) with an Astro project consistently causes the Netlify CLI to terminate with an Error: read ECONNRESET. The underlying Astro development server starts successfully, but the Netlify CLI proxy crashes immediately after.
The command npm run dev (which runs astro dev) works perfectly fine on its own, indicating the issue is within the Netlify CLI's handling of the proxy or its interaction with the local environment.
Steps to reproduce
- Set up an Astro project on macOS 26.0.
- Install Node.js v24.3.0.
- Install the latest Netlify CLI (npm install -g netlify-cli).
- Run netlify dev.
- The CLI will start the Astro server and then immediately crash.
Troubleshooting Steps Taken
The following steps were taken to resolve the issue, none of which were successful:
- Updated Netlify CLI: Upgraded from 17.22.1 to the latest version (22.2.1). The error persisted.
- Node.js Version Management (nvm):
- Installed nvm.
- Switched to Node.js LTS v22.17.0. The error persisted.
- Switched to Node.js LTS v20.19.3. The error persisted.
- Configuration Standardization:
- Created a .nvmrc file with 20 to lock the Node.js version.
- Removed the NODE_VERSION environment variables from netlify.toml to rely solely on .nvmrc. The error persisted.
- Downgraded Netlify CLI: Downgraded to [email protected] while using Node.js v20. The error persisted.
The error read ECONNRESET occurred consistently across all attempted configurations, suggesting a deep-seated incompatibility between the Netlify CLI's proxy mechanism and the networking stack on the latest macOS version.
Configuration
- Project: Astro
-
netlify.toml:
1 [build]
2 command = "npm run build"
3 publish = "dist"
4
5 [build.environment]
6 NODE_VERSION = "20"
7 NODE_OPTIONS = "--no-warnings --experimental-modules"
8
9 [context.production]
10 environment = { NODE_VERSION = "20", NODE_OPTIONS = "--no-warnings --experimental-modules" } 11 12 # ... (rest of the file)
Environment
1 System: 2 OS: macOS 26.0 3 CPU: (12) arm64 Apple M4 Pro 4 Binaries: 5 Node: 24.3.0 - /opt/homebrew/bin/node 6 npm: 11.4.2 - /opt/homebrew/bin/npm 7 npmGlobalPackages: 8 netlify-cli: 22.2.1
Hi there. Unfortunately I'm not able to reproduce this.
Are you able to get Astro to work with Netlify CLI with any configuration at all? Are you able to get any non-Astro site to work with Netlify CLI? Can you please share the full error?
Thanks
Please verify the web browser utilized for application launch.