-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes crashes due to lost of connection #105
Conversation
Thanks for the PR! Can you provide a little more detail on how exactly this fixes the issue? Looking at the code, it seems that you convert an error from Also another thing about going offline is that this module is designed to fail if it hasn't cached a tarball and you try to request it while offline. The |
Oh sorry, didn't read #104. Based on that issue, it seems like the real issue is that you want to increase the timeout. Is that correct? |
Hey Nolan. I tried increasing the timeout, but it seems that on bad connection there might be situations where the reply can come back after up to 5min (I know my connection at times is terrible) and it seems unreasonable to increase the timeout to that level. Also part of the problem is that when local-npm fails the npm install process keeps running unaware that there is nothing on the other end. So my solution was to pass the failure to the npm install process, this way npm can request the package again and at the end fail showing the user that a specific package could not be retrieved. Dror |
@DrorT OK, so I'm still not quite understanding how this PR changes the existing behavior? Aren't timeouts still passed as errors to the npm CLI? |
Hey @nolanlawson, |
I just double-checked the Anyway thanks for the PR, will merge and publish a fix shortly. |
Thanks :) |
nice! glad to hear it. :) |
I can second that. |
Fix for issue #104 that I opened a few days ago