Re-evaluating an errored ESM should lead to rejecting the rejection again - this is also the case when importing it twice. In the case of retrying with require after import, just throw the cached error. Drive-by: add some debug logs. PR-URL: https://github.com/nodejs/node/pull/58957 Backport-PR-URL: https://github.com/nodejs/node/pull/59504 Fixes: https://github.com/nodejs/node/issues/58945 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Refs: https://github.com/nodejs/node/issues/52697 |
||
|---|---|---|
| .. | ||
| cjs | ||
| esm | ||
| helpers.js | ||
| package_json_reader.js | ||
| run_main.js | ||