Cannot terminate the dev server process with `Ctrl+C` while running `nx serve <app-name>`
See original GitHub issueSteps to Reproduce
- Start dev server using
nx serve <app-name>
in Zsh or Bash - Server starts on port:4200
- Use Ctrl+C to stop the process
Current Behavior
- The server is still running on the same port. When you try to start the dev server again the following error appears:
[error] Error: Port 4200 is already in use. Use '--port' to specify a different port.
at Server.<anonymous> (......./node_modules/@angular-devkit/build-angular/src/angular-cli-files/utilities/check-port.js:27:28)
at Object.onceWrapper (events.js:417:26)
at Server.emit (events.js:310:20)
at emitErrorNT (net.js:1340:8)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Note: using ng serve <app-name>
works as expected
Expected Behavior
- The process is terminated after pressing Ctrl+C When you start a server again the port is available for use
Environment
OS: macOS Shell: Zsh, Bash
nx report:
@nrwl/angular : 9.5.1
@nrwl/cli : 9.5.1
@nrwl/cypress : 9.5.1
@nrwl/jest : 9.5.1
@nrwl/tao : 9.5.1
@nrwl/workspace : 9.5.1
typescript : 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:23
Top Results From Across the Web
Project Configuration - Nx
{ "name": "mylib", "scripts": { "test": "jest", "build": "tsc -p tsconfig.lib.json", // the actual command here is arbitrary "ignored": "exit 1" }, "nx":...
Read more >How to Deploy, Manage and Scale Node.js Apps with PM2
Go ahead and start the server for your application in development mode using the command below. Ensure to kill the previous instance with...
Read more >Failed to create nx workspace - node.js - Stack Overflow
I am facing the same issue for resolving use below command for creating new workspace:- npx create-nx-workspace --preset=angular ...
Read more >Cisco MDS 9000 Series Command Reference - Show ...
Configures the default accounting method. show aaa authentication. To display configured authentication information, use the show ...
Read more >Introduction to building an Angular app with Nx Workspace
For example, an API change might need to be reflected both on a server app and a client app. With monorepo, all of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @FrozenPandaz @vsavkin,
I’m still encounter this issue in my Nx + Nextjs project with following dependency:
"@nrwl/next": "13.5.2"
This is happening to us as well on nx version 14.7.6 and node v16.14.0