Allow only one version of a package in yarn

The --flat option tells yarn to install only one version of a package:

yarn install --flat

In case of version constraint conflicts, you’ll be prompted for specific versions.