Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Version 8.1.5 of this library incompatible with @aws-sdk/client-sqs version 3.507.0 #457

Closed
NihinFaj opened this issue Feb 6, 2024 · 5 comments

Comments

@NihinFaj
Copy link

NihinFaj commented Feb 6, 2024

Describe the bug

Version 8.1.5 of this library errors out when used with version 3.507.0 of @aws-sdk/client-sqs library.

Your minimal, reproducible example

https://stackblitz.com/edit/sqs-consumer-starter-4nceen?file=index.js,package.json

Steps to reproduce

  1. Start new project
  2. Install AWS SQS Client v3.507.0
  3. Install sqs-consumer v8.1.5
  4. Try to initialise and consume messages from an SQS Queue

Expected behavior

As a User
I expected to consume events from SQS using the sqs-consumer library

How often does this bug happen?

None

Screenshots or Videos

"err": {
        "type": "SQSError",
        "message": "SQS receive message failed: __importStar is not defined",
        "stack": "SQSError: SQS receive message failed: __importStar is not defined\n    at toSQSError (/service/dist/index.js:64873:24)\n    at Consumer2.receiveMessage (/service/dist/index.js:65143:41)",
        "name": "SQSError",
        "code": "ReferenceError",
        "time": "2024-02-05T14:24:27.109Z"
    }

Platform

Node v18.17.1

Package version

v8.1.5

AWS SDK version

v3.507.0

Additional context

No response

@nicholasgriffintn
Copy link
Member

This is a major version change (AWS do it a little differently), we only support 3.4 onwards, we will look at the issues with 3.5, but for now, you should stick to 3.4 or above until a release for 3.5.

@nicholasgriffintn
Copy link
Member

On further investigation, I don't actually think this is the case, I've opened a draft PR here to run our tests, they're all passing including the E2E validation:

#458

Have you tested your code with an aws sdk version previous to 3.5? Your error references __importStar being undefined, to me, this looks like an internal component within your codebase.

I'd suggest checking through your codebase to be sure and downgrading your aws-sdk version if you haven't already.

Otherwise, if you are still getting issues, can you provide a full reproduction? If we can't reproduce it, we can't really do anything.

@thecodinglinguist
Copy link

This has been an issue for us when using esbuild as of dynamic imports in >= 3.5. So this might not really related to sqs-consumer and instead be the project build tool.

@nicholasgriffintn
Copy link
Member

nicholasgriffintn commented Feb 8, 2024

Yeah, possibly this: aws/aws-sdk-js-v3#5750, which a patch was released for, closing this as it doesn't appear to be an issue with the consumer but it is with aws sdk.

Copy link

github-actions bot commented Mar 9, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants