Sitelet https://github.com/yarnpkg/yarn/issues/6734
Skip to content

yarn audit does not work in a monorepo if the root does not contain name and version聽#6734

Description

@rally25rs

Do you want to request a feature or report a bug?

馃悶

What is the current behavior?

If using yarn audit from a monorepo, if the root package.json does not have name and version fields, then the npm audit API will return an HTTP 500.

If the current behavior is a bug, please provide the steps to reproduce.

Make a monorepo with no name and version in the root package.json and run yarn audit

This is related to #6611 but where the monorepo root is missing the fields instead of individual packages. Since the monorepo root isn't really a publishable npm package, we shouldn't assume that it would have to have a name and version.

What is the expected behavior?

Since the npm API seems to require name and version, yarn should probably add something as a placeholder for the API call, even when it is missing from the monorepo package.json.

Please mention your node.js, yarn and operating system version.

1.12.3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions