yarn
yarn copied to clipboard
yarn audit fails: Unexpected audit response (Missing Metadata): false
yarn audit
fails with error Error: Unexpected audit response (Missing Metadata): false
when some combination of dependencies exist.
Repro
- Create a package.json
{
"name": "yarn-audit-bug",
"dependencies": {
"@cypress/webpack-dev-server": "^3.7.1",
"html-webpack-plugin": "^5.5.3",
"webpack": "^5.89.0"
}
}
- Run
yarn install && yarn audit
Outcome
error Error: Unexpected audit response (Missing Metadata): false
at Audit.<anonymous> (C:\Users\malliel\AppData\Local\node\corepack\yarn\1.22.21\lib\cli.js:59326:15)
at Generator.next (<anonymous>)
at step (C:\Users\malliel\AppData\Local\node\corepack\yarn\1.22.21\lib\cli.js:310:30)
at C:\Users\malliel\AppData\Local\node\corepack\yarn\1.22.21\lib\cli.js:321:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Expected outcome
Should report on vulns and not fail.
Additional info
yarn audit
works if you instead do npm install
first. npm audit
works as well.
Environment
Yarn: 1.22.21 OS: Windows
@elonmallin I CAN WORK ON THIS PLEASE ASSIGN ME THIS TASK
@Debshibraj123 I'm not a maintainer of this repo so can't assign tasks, I just created the issue
I ran into this same issue on an existing project that I was updating a few dependencies for. Deleting node_modules and the yarn.lock file and running yarn install
to rebuild the lock file resolved the issue for me.