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

ESM-Support for node #888

Open
lo1tuma opened this issue Nov 1, 2023 · 0 comments
Open

ESM-Support for node #888

lo1tuma opened this issue Nov 1, 2023 · 0 comments

Comments

@lo1tuma
Copy link

lo1tuma commented Nov 1, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant