-
Notifications
You must be signed in to change notification settings - Fork 597
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
EndpointFunctions[fn] is not a function #5435
Comments
Hi @taoatmars, I'm not able to reproduce the reported behavior. I used Docker to containerize my application and I can use the lambda client without any issues. It's possible that your lock file has multiple copies of the SDK pinned at different versions. If you want to inspect it you can try this:
Or let npm resolve the dependency tree by: cd your-project-root
rm -rf node_modules && rm package-lock.json && npm install to regenerate your lock file. Let me know how it goes. All the best, |
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing. |
I'm seeing the same issue. I don't believe this should be closed. I reverted back to |
I got this issue too. Turned out I had one of my local modules called |
Interesting. I don't think that is the issue I'm seeing. |
Seeing the same issue here but tracing to the
|
Had the same issue with |
Hi folks, Thanks for staying active on the thread. Did any of you try the solution I included in this comment? That will help me investigate this further. Thanks, |
From my experience it appears to be a bundling issue. I have experienced a similar issue with the Checking the packages inside the lambda runtime locally with |
I did. But I solved my issue with a bit of persistence and printf debugging 😁 as I wrote, the problem was that ncc picked a wrong module (i.e. just skipped the right one). This was pretty clear from reading the resulting code. |
I just ran into this issue when upgrading to I also have a module called |
This works for me too, I clean the package-lock.json, upgrade version and reinstall. |
Hey, I'm on the same boat, did you manage to find a solution? |
@sheeni17 What worked for me was to revert sst to version 2.35.1 |
The aws call I'm trying to make is I don't have the same
The total ruleset is defined here: This is where one of the conditions The rule condition is coming from many rules, here are a couple.
Going back in the history of that file, that condition has always been there. The smithy client must not be able to handle those functions, but the old utils must have been able to. I haven't dove into the old utils that shipped with this package. I believe the change happened with this PR #5390 It looks like the latest version of the |
related aws/aws-sdk-js-v3#5435 this happened with string video sources
* fix: Webpack dynamic import warning better * fix: downgrade @aws-sdk/client-s3 to fix bundling related aws/aws-sdk-js-v3#5435 this happened with string video sources
In case this is helpful to someone else, I ran into a similar |
Got same issue when using version |
I have the same issue as #5435 (comment). InvestigationI can see the The logic is supposed to hit the branch https://github.com/smithy-lang/smithy-typescript/blob/main/packages/util-endpoints/src/utils/callFunction.ts#L13. From my local error stack: I can see there was a I believe this error is caused by the way we register I use Because of the version conflicts,
In But when we resolve the endpoint, we import the Possible SolutionSo one possible solution is to re-export For a temp workaround, I revert If I resume Hope this can help with your investigation. @RanVaknin |
I can confirm that this issue arises when package version resolution results in multiple versions of In the meantime, a workaround is to use |
I have the same issue here... when I upgrade my project from Next.js 13 to Next.js 14. Unlike the comments above, I only have a single version of However, I am using a monorepo with pnpm workspaces. And the fun fact is that it works well with Next.js 13.5.6 but not when I upgrade only my Here is the call-stack if this can help...
|
Got the same issue, when I upgrade |
When I ran into this issue it was due to a mismatch of some sort in the versions of aws packages. I don't have more detail, I just bumped an sts package from 496 to 498 or something similar and ran |
Can confirm this happens when upgrading from Next 13.5.6 -> 14.1.0 🥲 |
@DarrylBrooks97 what is your setup? Let's try to find what our two cases have in common to try and create a small project for reproduction. If you agree, of course! I am using a The root is in a folder called
From there, I have two Next.js projects and one Expo/React Native project:
All these depend on packages listed below... one of which is my AWS wrapper which depends on
My shared packages:
We could try and send the output of |
Pinning the package to // package.json
"pnpm": {
"overrides": {
"@smithy/util-endpoints": "1.1.2"
}
},
|
I have a reproducible test case ✅ 🚀 Same repo as earlier, but I've modified the setup to a pnpm monorepo https://github.com/janvorwerk/aws-s3-demo
All hints about multiple versions of |
@janvorwerk We are also facing the same issue. We tried pinning the version, but no success. |
What worked for me @coronapl is to remain on an older AWS SDK version as mentionned in the bug description. |
If you use SST: |
Hi everyone on the thread. Thank you for your patience and for participating in the discussion. The problem that was initially reported was caused because of multiple copies of For some of you using Next 14, I see this is still an issue. We think this is likely a problem with the bundler Next 14 uses or with the build system itself. Since there are multiple scenarios in which this is manifesting in, some are solved with a simple deduping of versions, some are not I'm going to close this thread, and ask that if none of the solutions on this thread work out for you, please create a new separate issue and include a minimal repro code, preferably in the form of a github repo. Thanks, |
Checkboxes for prior research
Describe the bug
aws-sdk recently switched from @aws-sdk/util-endpoints to @smithy/util-endpoints, when calling client-lambda inside a container, Error:
endpointFunctions[fn] is not a function
will appear when calling lambda functions.SDK version number
@aws-sdk/client-lambda@3.438
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v18.18.2
Reproduction Steps
Observed Behavior
@smithy/util-endpoints was not able to find a function call
endpointFunctions
Expected Behavior
@smithy/util-endpoints able to locate and call
endpointFunctions
Possible Solution
roll back to "@aws-sdk/client-lambda": "3.418.0"
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: