Closed parties closed 5 years ago
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 npm install
. So that might be a way to trigger the bug, npm install
and manually disconnect computer from the internet.
npm -v
6.9.0
node -v
v10.15.3
Forgot to say that I only use npm
, not pacote.
Forgot to say that I only use
npm
, not pacote.
pacote
is a dependency of npm
(package.json
).
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}$/)) { ... }
@parties when #170 will be merged?
+1 on this
@parties when #170 will be merged?
Not yet, you can watch the PR for more details.
I approved the changes, but I don't have permissions to merge, so we'll have to wait for official approval.
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?