Skip to content
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

yarn audit fails: Unexpected audit response (Missing Metadata): false #9019

Open
elonmallin opened this issue Dec 4, 2023 · 3 comments
Open

Comments

@elonmallin
Copy link

yarn audit fails with error Error: Unexpected audit response (Missing Metadata): false when some combination of dependencies exist.

Repro

  1. 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"
    }
}
  1. 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

@Debshibraj123
Copy link

@elonmallin I CAN WORK ON THIS PLEASE ASSIGN ME THIS TASK

@elonmallin
Copy link
Author

@Debshibraj123 I'm not a maintainer of this repo so can't assign tasks, I just created the issue

@Zachatoo
Copy link

Zachatoo commented Mar 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@Zachatoo @elonmallin @Debshibraj123 and others