This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 62
"err.code.match is not a function" after a failed git clone #169
Comments
Confirmed - this still appears to be an issue in 6.9.0. Not sure yet what the underlying error is, since it is getting masked by the bug. |
I got hit by this too. Lost internet connection during and
|
Forgot to say that I only use |
|
Issue still persists. Have anyone found the solution? Cause: it is coming from this line of code within with-tarball-stream.js. if (opts.cache && err.code && !err.code.match(/^E\d{3}$/)) { ... } |
#170 aims to fix this. |
+1 on this |
#170 is merged! |
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
I discovered this bug while using NPM to clone a private git repository and the clone failed (
ssh_exchange_identification: Connection closed by remote host
, could be a rate-limit issue from our internal server).Error log from
npm i --verbose
:Unfortunately I don't know how to reproduce the bug in an environment outside our internal network (since it requires the remote host to close the connection).
Error message from inspecting
err.cause.message
in the Node debugger:I can confirm that I do have access to the repository, and running
npm i
will sometimes pass without any errors (which leads me to believe it's a rate-limit issue on our side).Cause: it is coming from this line of code within
with-tarball-stream.js
.The issue is that
err.code
is aNumber
, not aString
, and theNumber
prototype does not have amatch
function.I would assume the easiest fix would be to simply interpret the code as a
String
andmatch
from there:Thoughts?
The text was updated successfully, but these errors were encountered: