-
Notifications
You must be signed in to change notification settings - Fork 43
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
retry is not kicking in with npm 6.x #128
Comments
A bit of digging confirms that both are error messages: This is certainly an issue. I am not a fan of processing the error message since it's very brittle, but a quick fix would be an if+elseif on the From the NPM audit src: if (err.statusCode >= 400) {
let msg
if (err.statusCode === 401) {
msg = `Either your login credentials are invalid or your registry (${opts.registry}) does not support audit.`
} else if (err.statusCode === 404) {
msg = `Your configured registry (${opts.registry}) does not support audit requests.`
} else {
msg = `Your configured registry (${opts.registry}) may not support audit requests, or the audit endpoint may be temporarily unavailable.`
}
if (err.body.length) {
msg += '\nThe server said: ' + err.body
}
const ne = new Error(msg)
ne.code = 'ENOAUDIT'
ne.wrapped = err
throw ne
}
throw err Note that his has been an issue for npm >= v6.10.2: nodejs/node@d7d321b EDIT: Didn't mean to close! |
A quicker fix is simply to shorten the partial error message matching to |
thanks @quinnturner ! |
Looks like the error message is not matched, is this a known issue?
The text was updated successfully, but these errors were encountered: