Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Better errors on module not found #443

Closed
@MylesBorins

Description

I think it is going to be a fairly common pattern (for a while) that people will expect they can import a file without an extension. When a module is not found ERR_MODULE_NOT_FOUND is thrown. The error is thrown in module_wrap.cc within Maybe FinalizeResolution

Before throwing ERR_MODULE_NOT_FOUND we could check with the node resolution algorithm if there is a file that would have resolved with that specifier and let the developer know the path of the expected file.

Thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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