Open kaiyoma opened 4 years ago
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
Seeing this again a lot right now. yarn audit
is failing more than half the time with a 503 error.
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