Skip to content

import ES module #807

@entin-hun

Description

@entin-hun

Following the guide, after successful yarn graphclient build I get stuck at import { execute } from '../.graphclient' .

  • If running as JS : SyntaxError: Cannot use import statement outside a module
  • If as .mjs : Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import './graphclient' is not supported resolving ES modules

Screenshot 2024-08-29 at 08 47 20

How should it be correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions