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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rally25rs opened this issue Nov 28, 2018 · 0 comments
Assignees
Labels

Comments

@rally25rs
Copy link
Contributor

rally25rs commented Nov 28, 2018

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

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

No branches or pull requests

1 participant