Skip to content

Error on import ES moduleΒ #83

@vishniakov-nikolai

Description

@vishniakov-nikolai

Cell with this content:

const lib = await import('./lib.mjs');

returns error:

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/username/project/lib.mjs not supported.
Instead change the require of /home/username/project/lib.mjs to a dynamic import() which is available in all CommonJS modules.
    at _._load (/home/username/project/index.js:2:115372)
    at  [1, 0]

I think notebook interpreter replace import to require as is. This results in an error.

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