module: print better message on esm import error
Use the same approach as a previous PR to include the offending line in the output and underline imports of inexistent exports.
Fixes: https://github.com/nodejs/node/issues/17785 Refs: https://github.com/nodejs/node/pull/17281
/cc @bnoordhuis
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
module