#Address already in use onsave

10 messages · Page 1 of 1 (latest)

marsh edge
#

Hi,
i updated my project to v9, I see that every time I save a TS file I get an error: Error: listen EADDRINUSE: address already in use :::4001
What am I missing? isnt nest killing the process before the new start?
Thanks

lone ocean
#

It should be solved by doing the port kill via the terminal command, if you use linux

thin spear
#

npx kill-port 4001

#

Run this command in command prompt

marsh edge
#

i know how to kill a port, its just doesnt stop.
I need to run again the app on save...
Isnt that the idea behind hot reload?

thin spear
marsh edge
#

npm run start:dev / start:debug

thin spear
# marsh edge npm run start:dev / start:debug

Never had this issue...
What i m getting is ur problem is
U start the app with npm run start:dev
And then whenever u saved ur changes (pressing Ctrl+S) ...ur nest app didn't get restarted on it's own ..u have to stop the app and restart it manually using the same command

#

Is that right?

marsh edge
#

No.

  1. I run the npm command the first time,
  2. I make a change to a ts file.
  3. The server restarts automatically but fails to load because the port is taken,

I need to stop the npm command with Ctrl+C abd run it again.
over and over again