istanbuljs / nyc

the Istanbul command line interface
https://istanbul.js.org/
ISC License
5.55k stars 353 forks source link

nyc stopped working on project converted to ESM #1496

Open andreashuber69 opened 1 year ago

andreashuber69 commented 1 year ago

Link to bug demonstration repository

https://github.com/andreashuber69/verify-coldcard-dice-seed/tree/develop

NOTE: See this commit on the develop branch.

Expected Behavior

nyc should work as it did before commit, e.g. here

Observed Behavior

nyc fails with the error message: Must use import to load ES Module [...]

Troubleshooting steps

Environment Information

System: OS: Linux 5.10 undefined CPU: (12) x64 Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz Memory: 27.19 GB / 31.24 GB Binaries: Node: 18.12.0 - /usr/bin/node npm: 8.19.2 - /usr/bin/npm npmPackages: nyc: ^15.1.0 => 15.1.0 ts-node: ^10.9.1 => 10.9.1 typescript: ^4.8.4 => 4.8.4