Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: read ECONNRESET occurs on ionic serve for newly created apps

I have just created an ionic 3 app. When I execute ionic serve, it runs successfully but when I change something on any file on the project like I changed the text "Welcome to Ionic", the serve breaks and throw following error.

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

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

my ionic details are

cli packages: (C:\Users\Imdad Turi\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

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

System:

Android SDK Tools : 25.2.3
Node              : v6.9.1
npm               : 4.6.1
OS                : Windows 8.1

Environment Variables:

ANDROID_HOME : C:\Users\Public

Misc:

backend : pro

enter image description here

Anyone, please?

like image 897
Imdad Ali Avatar asked Dec 14 '22 19:12

Imdad Ali


2 Answers

This bug is caused by latest ionic-app-script package using ws v3.3.3 as dependencies.

Solution that worked for me: Remove ./node_modules/ws folder and run

npm install [email protected]

If this does not work, try upgrading ionic/app-scripts to version 3.1.6.

https://github.com/ionic-team/ionic-app-scripts/issues/1345

like image 164
alchi baucha Avatar answered Dec 17 '22 23:12

alchi baucha


npm install @ionic/[email protected] --save-dev
like image 20
Ramosta Avatar answered Dec 18 '22 00:12

Ramosta