standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 147 forks source link

Problems when using in a monorepo with Lerna #903

Open mbrowne opened 2 years ago

mbrowne commented 2 years ago

Hi, I'm moving my existing repo using esm into a monorepo using lerna.

When I use lerna run --stream dev to start my app, the command works, but some of the output is being swallowed and doesn't show up in the console. If I cd to the specific package and run yarn dev then it works fine (logs all output).

An easy way to reproduce the issue is to add an import to a non-existent module, to your code:

import 'i-dont-exist'

The error message gets logged when running the app directly, but not when running it using lerna.

Has anyone else encountered this? I'm not sure if it's an esm issue or a lerna issue.