frantz / amazon-s3-uri

A URI wrapper that can parse out information about an S3 URI
MIT License
27 stars 11 forks source link

amazon_s3_uri_1.default is not a function #292

Closed Facuiguacel closed 2 years ago

Facuiguacel commented 2 years ago

Basically the title. I'm using the AmazonS3URI function just like it's displayed in the readme (const { bucket, key } = AmazonS3URI(uri)) but I get this: TypeError: amazon_s3_uri_1.default is not a function

I'm running this in a NestJS project which uses TypeScript. Might that be the issue?

Facuiguacel commented 2 years ago

Fixed by adding "esModuleInterop": true to the project's tsconfig.json. Although it did brake imports from other packages which I had to fix by importing them like this import something from 'some-package' instead of this way import * as something from 'some-package'