jeffijoe / typesync

Install missing TypeScript typings for dependencies in your package.json.
MIT License
1.53k stars 22 forks source link

Error: read ECONNRESET #89

Closed jlarmstrongiv closed 1 year ago

jlarmstrongiv commented 2 years ago

It seems that typesync experiences intermittent connection issues often. Having a system to back off and retry would be nice.

✖  read ECONNRESET
Stack:
Error: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20)
npm ERR! Lifecycle script `typesync:check` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @universaljs/is@1.0.0 
npm ERR!   at location: /home/ubuntu/actions-runner/_work/project 
jeffijoe commented 2 years ago

You're not wrong 😅

I never thought about it because it hasn't happened to me yet.

jlarmstrongiv commented 2 years ago

I’ve been building my own personal monorepo with several packages and apps—unfortunately, typesync crashes with that error more than it passes 😅

I saw https://github.com/jeffijoe/typesync/blob/master/src/npm-client.ts and think something like https://www.npmjs.com/package/axios-retry could fit nicely

jeffijoe commented 2 years ago

I've been meaning to swap out axios for [npm-registry-fetch](https://github.com/npm/npm-registry-fetch) which I believe may include retries, but not sure.

I haven't had time to work on OSS for a while though.