Closed Amenocy closed 2 years ago
we converted our cjs lambdas to esm to use top-level awaits. also we are using esbuild.
got error when trying to create new instance of SdkAuth, :
import SdkAuth from '@commercetools/sdk-auth';
error is:
client: new import_sdk_auth.default({ ^ TypeError: import_sdk_auth.default is not a constructor
tested with node 14,16 and 18.
i solved problem
import * as SdkAuth from '@commercetools/sdk-auth'; new SdkAuth.default.default({
but obviously it is just a trick.
we converted our cjs lambdas to esm to use top-level awaits. also we are using esbuild.
got error when trying to create new instance of SdkAuth, :
error is:
tested with node 14,16 and 18.