typescript-with-electron-react-kit icon indicating copy to clipboard operation
typescript-with-electron-react-kit copied to clipboard

Dev Port not being released?

Open nolawnchairs opened this issue 7 years ago • 3 comments

Each time I close the application window, I cannot relaunch (using npm start), as I get this error:

Error: listen EADDRINUSE 0.0.0.0:4925 at Object.exports._errnoException (util.js:1020:11) at exports._exceptionWithHostPort (util.js:1043:20) at Server._listen2 (net.js:1262:14) at listen (net.js:1298:10) at net.js:1408:9 at _combinedTickCallback (internal/process/next_tick.js:83:11) at process._tickDomainCallback (internal/process/next_tick.js:128:9)

I can launch again by changing the port number in fuse.ts, but it's not convenient to change this every time I need to close and re-open the window while testing.

I also notice that everything you build is VERY mac-exclusive (I am developing on a Windows 10 machine), including the scripts in the package.json file - perhaps this error I'm getting is somehow caused by some unix command instead of a win32 command?

Any clues?

nolawnchairs avatar Oct 28 '17 17:10 nolawnchairs

Ya that's strange. Sounds like those dev server processes aren't getting closed when you close that window.

Can you close the running dev server safely first somehow? Click control-c or something?

skellock avatar Oct 29 '17 16:10 skellock

Closing the dev server (Control-C) works as expected, subsequent launches are successful. Perhaps if you could tell me where and how the shutdown is handled when closing the window, (when the port is closed) I could see if anything jumps out at me as something mac-specific that may be causing issues on a PC.

nolawnchairs avatar Oct 30 '17 04:10 nolawnchairs

That functionality is handled by fusebox. They spin up the dev server.

skellock avatar Oct 30 '17 12:10 skellock