parcel: Error: read ECONNRESET

Hello, I am trying to get started with Parcel. I created an index.html file with an index.js and when I run

parcel index.html

localhost:1234 opens fine but as soon as I save the file the server stops and I get

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

Error: read ECONNRESET
    at _errnoException (util.js:999:13)
    at TCP.onread (net.js:629:25)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 17
  • Comments: 25 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Guys this resolved the problem

Just run:

npm i -D -E ws@3.3.2

https://github.com/ionic-team/ionic-cli/issues/2921#issuecomment-352359738

Than it’s affecting more people than expected, i’ll do my best to speedup getting the PR through

@goyney This will be fixed once PR #320 lands

@wangjian1119 I solve this problem by locking ws@3.3.2 for now with yarn resolutions

https://github.com/JounQin/parcel-study/blob/master/package.json#L70

You can just try it.

`wss.on(‘connection’, function (ws) { ws.on(‘error’, function (msg) { //must console.log(msg) }) ws.on(‘close’, function (msg) { //must console.log(msg) })

})`

Fix pushed in v1.2.1.

hmmm @DeeJayElly solution is not working for me. Parcel still crashed when I manually reload the page. I’m using the latest Chrome and ws@3.3.2. It’s working fine in Safari though.

EDIT: it seems HMR is working normally and doesn’t trigger the crash so everything is okay as long as I don’t reload the page manually.

@DeeJayElly thanks!This is a good way of resolution

@DeeJayElly your solution work for me thanks;

For me, it’s breaking just upon reloading a page that is including the output. No html file change needed.

I’m running parcel src/main.js -d web/dist, and including only <script src="/dist/main.js"></script> on my page.