Ionic Serve crash on save

Hello here’s an issue i have.

Step to reproduce

  • Create a blank app from command line
  • ionic serve (OK)
  • Update & save html or ts script produces

lint finished in 2.63 s
build started …
deeplinks update started …
deeplinks update finished in 6 ms
template update started …
template update finished in 4 ms
build finished in 15 ms

events.js:183
throw er; // Unhandled ‘error’ event
^

Error: read ECONNRESET
at _errnoException (util.js:1024:11)
at TCP.onread (net.js:615:25)

This occurs only in new projects blank / tabs / sidemenu …

My other projects are still up & running properly

My config :

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 : 25.2.5
ios-deploy        : 1.9.2 
ios-sim           : 6.1.2 
Node              : v8.9.3
npm               : 5.5.1 
OS                : macOS High Sierra
Xcode             : Xcode 9.2 Build version 9C40b 

Environment Variables:

ANDROID_HOME : /Users/untildigital/android-sdk/

Misc:

backend : pro

Any help would be appreciated

Cheers

1 Like

I also have this problem. waiting for solution

1 Like

Having the same issue too on a certain project.

1 Like

What do you get when you run the same command with --verbose added at the end?

with --verbos

$ ionic serve --verbos
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 357 29 --dev-logger-port 53703 --nobrowser - Ctrl+C to cancel
[17:48:40] watch started …
[17:48:40] build dev started …
[17:48:40] clean started …
[17:48:40] clean finished in 19 ms
[17:48:40] copy started …
[17:48:41] deeplinks started …
[17:48:41] deeplinks finished in 72 ms
[17:48:41] transpile started …
[17:48:50] transpile finished in 9.17 s
[17:48:50] preprocess started …
[17:48:50] preprocess finished in 1 ms
[17:48:50] webpack started …
[17:48:50] copy finished in 9.65 s
[17:49:04] webpack finished in 14.00 s
[17:49:04] sass started …
[17:49:07] sass finished in 2.87 s
[17:49:07] postprocess started …
[17:49:07] postprocess finished in 20 ms
[17:49:07] lint started …
[17:49:07] build dev finished in 26.51 s
[17:49:07] watch ready in 26.75 s
[17:49:07] dev server running: http://localhost:8100/

[OK] Development server running!
Local: http://localhost:8100
External: http://192.168.1.29:8100
DevApp: ionic@8100 on BEHIRA

[17:49:14] lint finished in 7.22 s
[17:50:20] build started …
[17:50:20] deeplinks update started …
[17:50:20] deeplinks update finished in 13 ms
[17:50:20] template update started …
[17:50:20] template update finished in 14 ms
[17:50:20] build finished in 61 ms

events.js:183
throw er; // Unhandled ‘error’ event
^

Error: read ECONNRESET
at _errnoException (util.js:1024:11)
at TCP.onread (net.js:615:25)

1 Like

Unfortunately no useful output.

What did cause the rebuild at 17:50:20?

same issue, mine is occurs when i save and build starts again. i tried using verbose but the output remains the same as @villarres’s log

1 Like

when refreshing the page

I have the same problem, it breaks every time you save code, or refresh the page :frowning:

3 Likes

You should check https://github.com/ionic-team/ionic-cli/issues and create an issue if none exists yet.

So i’m not the only one in having this problem.
Everytime a file is saved => triggering the code packaging (livereload) server hangs.

Weird this is that it only happens on .ts & .html.
Sass building doesn’t break anything.

a hint : avery ionic start project building shoots that error now

ionic integrations enable cordova --quiet
[ERROR] Error with ./tabs/node_modules/ionic-angular/package.json file:
FILE_NOT_FOUND
[ERROR] Error with ./tabs/node_modules/@ionic/app-scripts/package.json file:
FILE_NOT_FOUND

Same here. First, ionic serve start well, but after save a file, it crashs.

1 Like

I filed an issue @ https://github.com/ionic-team/ionic-cli/issues

1 Like

Replied to add more info:

Started happening for me too this morning. Glad I’m not alone.

Do you guys are using Nodejs version >= 9 too?

I upgraded from 8.x.x to 9.3.0 today and I began to notice this error. Also to me, it happens sometimes just when I close a browser window

P.S.: I reported it before seeing the CLI issue, I linked them in Github

I have node v8.8.1 and npm 5.6.0

i’m running Node v8.9.3 & npm 5.5.1

Thx for your feedback.

I close then the issue I created and will follow the CLI one, no need of duplicate

I think the problem is the last update of Google Chrome!

I didn’t updated my CLI and app-scripts version, I just updated node and installed freshly the libs. But I recently updated my Chrome Version.

Therefore I tried and it turns out for me that the problem is chrome

ionic serve

open safari
access localhost:8100
click refresh
no problem

open chrome
access localhost:8100
click refresh
=> error

could you guys confirm this behavior? if yes, what should we do, proceed with the CLI issue or open an issue in Chrome?

3 Likes