Skip to content

Netlify CLI prints "terminated unexpectedly" in an infinite loop #8236

@akardet

Description

@akardet

Describe the bug

After running ntl dev, the dev server starts successfully — the Astro framework reports ready on port 3000, edge functions and serverless functions load, and the "Local dev server ready: http://localhost:8888/" banner is printed. Immediately after, the CLI starts printing the following message repeatedly, with no actual error details:

 ›   Error: Netlify CLI has terminated unexpectedly.

Please report this problem with reproduction steps at https://ntl.fyi/cli-error including the error details below.

The message loops indefinitely (hundreds of repetitions). The CLI never exits on its own and must be killed manually (SIGTERM is ignored; SIGKILL is required). The parent node ntl dev process accumulates many <defunct> zombie children while the loop runs. The dev server on :8888 remains responsive throughout.

Steps to reproduce

  1. Clone netlify/netlify-marketing-site,
  2. cd frontend
  3. npm install
  4. ntl link to the site
  5. Run ntl dev
  6. Wait for the Local dev server ready: http://localhost:8888 banner
  7. Observe Error: Netlify CLI has terminated unexpectedly. printed in a continuous loop with no accompanying error body

Configuration

[context.production.build]
command = "npm run build && cp ./custom-headers/_prodHeaders ./dist/_headers"

[context.branch-deploy.build]
command = "npm run build && cp ./custom-headers/_previewDeployHeaders ./dist/_headers"

[context.deploy-preview.build]
command = "npm run build && cp ./custom-headers/_previewDeployHeaders ./dist/_headers"

[[redirects]]
from = "/llms.txt"
to = "https://docs.netlify.com/llms.txt"
status = 200

[[redirects]]
from = "/access-control/*"
to = "https://app.netlify.com/.netlify/functions/access-control/:splat"
status = 200
headers = { x-access-control-proxy-key = [ACCESS_TOKEN] }

[[redirects]]
from = "/pagefind/"
to = "/pagefind/:splat"
status = 200
[redirects.headers]
Access-Control-Allow-Origin = "
"

[dev]
command = "astro dev"
targetPort = 3000

[[redirects]]
from = "/rum.js"
to = "https://app-tools-rum.netlify.app/rum.js"
status = 200

[[redirects]]
from = "/pdf/*"
to = "/.netlify/functions/pdf/:splat"
status = 200

[[edge_functions]]
path = "/guides/*"
function = "content-gate"

[[edge_functions]]
path = "/reports/*"
function = "content-gate"

[[edge_functions]]
path = "/webinars/*"
function = "webinar-gate"

[[redirects]]
from = "/webinars/ntl-deploy/"
to = "/deploy/"
status = 301

[[notifications]]
type = "email"
event = "submission_created"
address = "community@netlify.com"

Environment

System:
OS: macOS 26.4.1
CPU: (10) arm64 Apple M1 Pro
Memory: 123.67 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.13.1 - /Users/sam-tan/.nvm/versions/node/v22.13.1/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 11.11.1 - /Users/sam-tan/.nvm/versions/node/v22.13.1/bin/npm
Deno: 1.40.4 - /opt/homebrew/bin/deno
npmGlobalPackages:
netlify-cli: 26.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions