Skip to content

ECONNRESET immediately on netlify dev with Astro projects #7387

Open
@praxtom

Description

@praxtom

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

  1. Set up an Astro project on macOS 26.0.
  2. Install Node.js v24.3.0.
  3. Install the latest Netlify CLI (npm install -g netlify-cli).
  4. Run netlify dev.
  5. 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:

  1. Updated Netlify CLI: Upgraded from 17.22.1 to the latest version (22.2.1). The error persisted.
  2. 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.
  3. 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.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions