Ionic Serve cause Error: read ECONNRESET and crash itself


#1

ionic serve works well until I got the latest version of Ionic CLI.

it always crash for the first rebuild.

  1. ionic serve, everything goes well.
  2. edit a file, and save it.
  3. ionic serve, try to rebuild, it shows “build finished”
  4. crash, as error throw out:

here is log from terminal:

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at exports._errnoException (util.js:1022:11)
    at TCP.onread (net.js:569:26)

here is log from Chrome’s console:

VM242:164 WebSocket connection to 'ws://localhost:53703/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
WrappedWebSocket @ VM242:164
openConnection @ ion-dev.js?v=3.1.5:101
start @ ion-dev.js?v=3.1.5:18
(anonymous) @ ion-dev.js?v=3.1.5:467
(index):28 GET http://localhost:8100/cordova.js net::ERR_CONNECTION_REFUSED
(index):48 GET http://localhost:8100/build/polyfills.js net::ERR_CONNECTION_REFUSED
(index):52 GET http://localhost:8100/build/vendor.js net::ERR_CONNECTION_REFUSED
(index):55 GET http://localhost:8100/build/main.js net::ERR_CONNECTION_REFUSED
(index):58 GET http://localhost:35729/livereload.js?snipver=1 net::ERR_CONNECTION_REFUSED

Here’s my ionic info:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.5
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.1
    ios-sim           : 6.0.0
    Node              : v6.9.2
    npm               : 3.10.9
    OS                : macOS High Sierra
    Xcode             : Xcode 9.1 Build version 9B55

#2

See Ionic Serve crash on save


#3