Skip to content

Dev server continues to run after aborting npm run dev (Ctrl+C) #802

@alex996

Description

@alex996

Description

I had to restart the dev server after pulling in a package. In my terminal, where npm run dev command was being executed, I pressed Ctrl+C to abort it. Then I ran npm run dev again and it failed with some reference to localhost:8080, and from what I understood, the port was already occupied. Indeed, when I went to localhost:8080 the app was still running even though npm run dev was terminated and the terminal was closed.

Steps

  1. npm run dev
  2. Ctrl+C
  3. npm run dev

Results

  • Expected: it should restart the dev server
  • Actual: it fails with an error; the server isn't halted and continues to run on localhost:8000

Brute-force fix

Kill the process manually. In WIndows, you can kill Node.js: Server-side JavaScript from Task Manager.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions