Skip to content

ESM struggle #294

Description

@ricardo-valero

Hi, in my package.json I have two scripts, my start script is working, but dev using node-dev isn't

{
    "scripts": {
        "dev": "node-dev --experimental-specifier-resolution=node --loader ts-node/esm/transpile-only src/index.ts",
        "start": "node --experimental-specifier-resolution=node --loader ts-node/esm/transpile-only src/index.ts",
    },
   //...
}

I'm trying to work with ESM, because I need top level await

This is the error:

[ERROR] 19:34:14 RangeError: Unknown module format: null for URL file:///path_to_project/src/index.ts

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions