Hardhat Concurrency Issue

Demo repository for this issue: NomicFoundation/hardhat#4382

Installation

$ yarn

Steps to reproduce

$ yarn clean
$ yarn compile:error

Run both commands several times until it fails

You can also run:

$ yarn compile:success

To see that it works fine when concurrency is not used in Lerna