Comments (10)
This is an intermittent problem for us, but was just able to see this when running yarn locally:
$ yarn audit
yarn audit v1.13.0
/Users/pedemonte/.nvm/versions/node/v10.15.0/lib/node_modules/yarn/lib/cli.js:66237
throw new (_errors || _load_errors()).ResponseError(_this3.reporter.lang('requestFailed', description), res.statusCode);
^
Error: Request failed "503 Service Unavailable"
at ResponseError.ExtendableBuiltin (/Users/pedemonte/.nvm/versions/node/v10.15.0/lib/node_modules/yarn/lib/cli.js:702:66)
at new ResponseError (/Users/pedemonte/.nvm/versions/node/v10.15.0/lib/node_modules/yarn/lib/cli.js:808:124)
at Request.params.callback [as _callback] (/Users/pedemonte/.nvm/versions/node/v10.15.0/lib/node_modules/yarn/lib/cli.js:66237:19)
at Request.self.callback (/Users/pedemonte/.nvm/versions/node/v10.15.0/lib/node_modules/yarn/lib/cli.js:129397:22)
at Request.emit (events.js:182:13)
at Request.<anonymous> (/Users/pedemonte/.nvm/versions/node/v10.15.0/lib/node_modules/yarn/lib/cli.js:130369:10)
at Request.emit (events.js:182:13)
at IncomingMessage.<anonymous> (/Users/pedemonte/.nvm/versions/node/v10.15.0/lib/node_modules/yarn/lib/cli.js:130291:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
Agreed on try/catch
. I think in this case it would be good for audit-ci
to output the error from yarn
, so user knows what the underlying error is.
from audit-ci.
Just want to say that I'm also experiencing similar issue.
Yarn audit report summary:
Unexpected token / in JSON at position 0
Exiting...
error Command failed with exit code 1.
It runs fine on the second try though. Pretty annoying on the CI environment though.
It's on 1.4.1 version 🤷♂️
from audit-ci.
Thanks for the issue report. Are you able to share what the Yarn audit reports: yarn audit
? It would be great to know what the Yarn error is.
Similar issues have come up in the past, notably: #36.
We may have to introduce a try; catch
in the Yarn JSON-line parsing. Not sure what the expected behaviour will be if it fails.
from audit-ci.
Hi again,
Quite a few things have changed since this issue was opened and some changes may have fixed this issue. I am hoping you can re-test your project and see if you can reproduce with audit-ci@^1.4.0
(newest is 1.4.1
).
Let me know if I can help.
Thanks!
from audit-ci.
Same just happened to me in 1.4.1 too
$ audit-ci --critical
Yarn audit report summary:
Unexpected token / in JSON at position 0
Exiting...
error Command failed with exit code 1.
from audit-ci.
Thanks for the heads up. This is a priority fix.
First would be to appropriately catch the error and display the message more appropriately.
This is not the first time I've seen a retry fix an audit failure. As a secondary feature, we could implement a retry mechanism if it fails unexpectedly.
from audit-ci.
Any update?
from audit-ci.
PR: #66
from audit-ci.
I have had this issue on v1.5.0
from audit-ci.
Acknowledging that I've seen this, #76 is promising!
from audit-ci.
Related Issues (20)
- No results for yarn (berry) monorepo HOT 5
- Drop support for Node <12 HOT 1
- Long summary output for only one vulnerable advisory HOT 6
- Cannot convert undefined or null to object Exiting HOT 9
- Support allowlisting private packages by module HOT 7
- Recommend pinning to commit SHA or release tag HOT 3
- Add expiration time for allow list items HOT 1
- Allow notes for allowlist items HOT 2
- [Feature] Support Gitlab SAST report-type HOT 2
- Let the severity level influence the json output HOT 1
- Fail on unmatched ignores HOT 1
- Invalid JSON config file when using new allowlist NSPRecord syntax HOT 3
- Add support for registry flag for PNPM HOT 1
- Support Yarn's `--exclude` HOT 2
- Handle errors from Yarn Berry more gracefully HOT 2
- Tests should include all major Yarn versions HOT 2
- packages starting with "@" are not working in allowlist HOT 2
- Replace event-stream with something secure and supported HOT 4
- The audit report format changed? HOT 2
- CI commands fail because no version 7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audit-ci.