Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

ESM-Support for node #888

@lo1tuma

Description

@lo1tuma

I’m trying to import the moltin sdk via import statement in a ESM node project like this:

import { Moltin, MemoryStorageFactory, gateway as _gateway } from '@moltin/sdk'; 

When running the code I get the following error:

SyntaxError: Named export 'Moltin' not found. The requested module '@moltin/sdk' is a CommonJS module, which may not support all module.exports as named exports.

Maybe it would enough to provide an exports mapping in the package.json.

Metadata

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