10000 Add common ESM errors to Troubleshooting page · Issue #1607 · TypeStrong/ts-node · GitHub
[go: up one dir, main page]

Skip to content
Add common ESM errors to Troubleshooting page #1607
@cspotcode

Description

@cspotcode

There are a few errors thrown by node -- and by our copy-pasted node code -- that confuse users. Add these to the troubleshooting page.

For example, when you try to require() a TS file and it's supposed to be executed as native ESM, the user gets a cryptic ERR_REQUIRE_ESM. When they try to do the same via import() instead of require() -- or node ./index.ts inside a type: module directory -- they get ERR_UNKNOWN_FILE_EXTENSION

Metadata

Metadata

Assignees

No one assigned

    Labels

    you can do thisGood candidate for a pull request.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0