You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lately, I've been noticing that yarn audit fails quite often with a 503 error code from the upstream server. It seems to be random: running the command over and over sometimes works, sometimes fails.
Command
yarn audit
What is the current behavior?
If I run with the verbose flag turned on, I see this:
verbose 2.2718308 Performing "POST" request to "https://registry.yarnpkg.com/-/npm/v1/security/audits".
verbose 15.5936641 Request "https://registry.yarnpkg.com/-/npm/v1/security/audits" finished with status code 503.
C:\Program Files (x86)\Yarn\lib\cli.js:66073
throw new (_errors || _load_errors()).ResponseError(_this3.reporter.lang('requestFailed', description), res.
statusCode);
^
ResponseError: Request failed "503 Service Unavailable"
What is the expected behavior?
No errors.
Environment
Node Version: 12.16.1
Yarn v1 Version: 1.22.4
OS and version: Windows 10 and Linux
The text was updated successfully, but these errors were encountered:
Just happened to run into this running npm audit as well, for what it's worth.
npm ERR! code ENOAUDIT
npm ERR! audit Your configured registry (https://registry.npmjs.org/) may not support audit requests, or the audit endpoint may be temporarily unavailable.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jake/.npm/_logs/2020-03-17T18_09_56_254Z-debug.log
Shows registry.npmjs.org also returns 503 in the verbose logs, so this might be NPM's fault:
5 http fetch POST 503 https://registry.npmjs.org/-/npm/v1/security/audits 13190ms
I have the same issue, but I'd like to add something to it in regards to the exit code. I don't mind the 503 (well I do), but I'm trying to do audit as part of a build process. I don't mind INFO or LOW, so I check if the return code is greater than 3 and continue. Because the 503 generates a return code of 1 my audit seems to complete just fine, as it is an "INFO".
Could you for the sake of scripting use a different exit code when a 503 enters? There is some kind of standard re exitcodes: http://www.tldp.org/LDP/abs/html/exitcodes.html, so I would propose 64.
Bug description
Lately, I've been noticing that
yarn audit
fails quite often with a 503 error code from the upstream server. It seems to be random: running the command over and over sometimes works, sometimes fails.Command
What is the current behavior?
If I run with the verbose flag turned on, I see this:
What is the expected behavior?
No errors.
Environment
12.16.1
1.22.4
The text was updated successfully, but these errors were encountered: