Why does NextJS allow the development server to run, but not the production server?

46 Views Asked by At

On my dev machine I have some Ivanti application service running at 'TCP 0.0.0.0:3000' according to netstat. Running npm run dev works and netstat then shows two entries for 'TCP 0.0.0.0:3000'. When started I get:

ready - started server on 0.0.0.0:3000, url: http://localhost:3000

but when I run npm start after quitting my dev server I get the error:

Error: listen EADDRINUSE: address already in use 0.0.0.0:3000  
...  
code: 'EADDRINUSE',  
errno: -4091,  
syscall: 'listen',  
address: '0.0.0.0',  
port: 3000

How is it that I'm able to run the dev server but not the prod server given they seem to be requesting the same resource ... which seems to already be used.

0

There are 0 best solutions below