SIGN IN SIGN UP
yarnpkg / yarn UNCLAIMED

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry

0 0 145 JavaScript

Fix: undefined@undefined requires a flat dependency graph (#4245) (#6369)

When `install`ing in a repo with a dependency that specifies `"flat:: true`, but without the `--flat` flag or `"flat": true` in your own package.json, you get an error: `The package undefined@undefined requires a flat dependency graph. Add \`"flat": true\` to your package.json and try again.`

This was occuring because the relevant error message, `flatGlobalError` was expecting two variables for interpolation: the package name and the package version.

This fix changes that to one variable (to be consistent with other uses) and passes the appropriate values in to the message.
D
Drew Benson committed
142bfcc9fb6cd8f7b214d929aba7401c85e504a9
Parent: 4b4fb60
Committed by Maël Nison <nison.mael@gmail.com> on 10/2/2018, 10:25:07 AM