jeffijoe / typesync

Install missing TypeScript typings for dependencies in your package.json.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: read ECONNRESET

jlarmstrongiv opened this issue · comments

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 

You're not wrong 😅

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

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

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.