We just upgraded our Detox version to 20.18.3 which includes @wix-pilot/core and ran into Detox crashing due to wix pilot trying to load an ESM version of chalk (version 5)
This happens because @wix-pilot/* uses chalk but doesn't depend on it:
|
import chalk from "chalk"; |
. So in our project we end up with chalk v5 in our
node_modules/ because other projects depend on v5 and v4 is only installed under
node_modules/detox/node_modules/ which
@wix-pilot/* doesn't use.
We've temporarily fixed by depending on chalk v4 so it is in our root node_modules/.