question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v4: ionic serve `Error: listen EADDRINUSE :::53703`

See original GitHub issue

Description: When using CLI v4 with a Ionic 3 project, the ionic serve command only works the first time.

After stopping the command with CTRL+C, running ionic serve again results in a error.

Restarting the computer fixes the problem.

Steps to Reproduce:

  1. Run ionic serve using CLI v4rc11 in a Ionic 3 Project
  2. Stop the serve command (CTRL+C)
  3. Run ionic serve again

Output:

> ionic-app-scripts serve --address 0.0.0.0 --port 8101 --livereload-port 35730 --dev-logger-port 53703 --nobrowser
[app-scripts] [12:31:03]  ionic-app-scripts 3.1.10
[app-scripts] [12:31:03]  watch started ...
[app-scripts] [12:31:03]  build dev started ...
[app-scripts] events.js:183
[app-scripts]       throw er; // Unhandled 'error' event
[app-scripts]       ^
[app-scripts]
[app-scripts] Error: listen EADDRINUSE :::53703
[app-scripts]     at Object._errnoException (util.js:992:11)
[app-scripts]     at _exceptionWithHostPort (util.js:1014:20)
[app-scripts]     at Server.setupListenHandle [as _listen2] (net.js:1355:14)
[app-scripts]     at listenInCluster (net.js:1396:12)
[app-scripts]     at Server.listen (net.js:1480:7)
[app-scripts]     at new WebSocketServer (C:\Users\***\node_modules\ws\lib\WebSocketServer.js:77:20)
[app-scripts]     at Object.createNotificationServer (C:\***\node_modules\@ionic\app-scripts\dist\dev-server\notification-server.js:66:15)
[app-scripts]     at C:\Users\***\node_modules\@ionic\app-scripts\dist\serve.js:58:31
[app-scripts]     at <anonymous>
[app-scripts]     at process._tickCallback (internal/process/next_tick.js:188:7)

[ERROR] A utility CLI has unexpectedly closed.

        The Ionic CLI will exit. Please check any output above for error details.

My ionic info:

Ionic:

   ionic (Ionic CLI)  : 4.0.0-rc.11 (C:\Users\***\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.7.1
   @ionic/app-scripts : 3.1.10

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : none

System:

   Android SDK Tools : 26.0.2
   NodeJS            : v8.11.3 (C:\Program Files\nodejs\node.exe)
   npm               : 5.6.0
   OS                : Windows 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fedmecommented, Jul 12, 2018

@dwieeb Seems to work now but the browser fails to lunch, getting this error instead: image

Also the port seems to be different at every ionic serve run (always incremented by one).

I should say I am on a different computer right now, this new issue could be totally unrelated. Will be back at the same computer on Monday and will test it then.

0reactions
imhoffdcommented, Jul 28, 2018

No. This is the fix: npm install @ionic/app-scripts@latest

This issue is resolved. Please create new issues if necessary. @raimaj

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: listen EADDRINUSE 0.0.0.0:53703 - Serve to the ...
The Ionic live reload server exited unexpectedly Error in the Ionic live reload server: Error: listen EADDRINUSE 0.0.0.0:53703. launch.json
Read more >
Neither 'ionic serve' nor 'npm run ionic:serve' are working
Neither 'ionic serve' nor 'npm run ionic:serve' are working ; you get an EADDRINUSE that means another app on your system is already...
Read more >
Latest topics - Ionic Forum
The Ionic live reload server exited unexpectedly Error in the Ionic live reload server: Error: listen EADDRINUSE 0.0.0.0:53703. launch.json
Read more >
ionic3之Error: listen EADDRINUSE :::53703错误-yellowcong
ionic3之Error: listen EADDRINUSE :::53703错误-yellowcong ... 这种错误很简单,就是明摆的端口占用的问题,多半是nodejs没有完全关闭导致的。解决的思路 ...
Read more >
Ionic 2 问题集Console.log 不输出编译Android报错 ...
"ionic:serve": "ionic-app-scripts serve" ... 错误:Error: listen EADDRINUSE 0.0.0.0:53703. 这有可能是端口53703被占用了,知道该怎么解决了吧。
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found