Skip to content

Log where module failures occur #200

Open
@aryzing

Description

@aryzing

Currently, when attw fails, the error message may look something like,

A require call resolved to an ESM JavaScript file, which is an error in Node and some bundlers. CommonJS consumers will need to use a dynamic import. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/CJSResolvesToESM.md.

The immediate question that comes to mind is: where is the import causing the failure? It would save considerable time and add clarity to the error message if the location of the incorrect module import was logged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions