-
Notifications
You must be signed in to change notification settings - Fork 573
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
undefined is not an object (evaluating 'endpointFunctions[fn].apply')] #5889
Comments
Try adding a line at the start of your application to import "@aws-sdk/util-endpoints" import "@aws-sdk/util-endpoints";
// or
require("@aws-sdk/util-endpoints"); |
After this Error changed to [Error: not implemented] on client.send line |
What is the actual stack trace? |
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. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Checkboxes for prior research
Describe the bug
We are using @aws-sdk/client-location to get SearchPlaceIndexForPositionCommand of lattitude and longitude and also using @aws/amazon-location-utilities-auth-helper to get credentials from aws through withAPIKey function, but while sending command it returns Error occurred: [TypeError: undefined is not an object (evaluating 'endpointFunctions[fn].apply')].
We are using react native.
code sample as below
import { LocationClient, SearchPlaceIndexForPositionCommand } from '@aws-sdk/client-location';
import { withAPIKey } from "@aws/amazon-location-utilities-auth-helper";
const authHelper = await withAPIKey(<API_KEY>);
const client = new LocationClient({
region: "ap-southeast-1",
...authHelper.getLocationClientConfig() // sets up the Location client to use the API Key defined above
});
const command = new SearchPlaceIndexForPositionCommand({
IndexName: "<INDEX_NAME>", // Place index resource to use
Position: [-123.1187, 49.2819], // position to search near
MaxResults: 10 // number of results to return
})
try {
const result = await client.send(command);
}
catch (error) {
}
SDK version number
"@aws-sdk/client-location": "^3.529.1", "@aws/amazon-location-utilities-auth-helper": "^1.0.4",
Which JavaScript Runtime is this issue in?
React Native
Details of the browser/Node.js/ReactNative version
0.64.1
Reproduction Steps
Just run the code and it throws error
Observed Behavior
Error occurred: [TypeError: undefined is not an object (evaluating 'endpointFunctions[fn].apply')]
Expected Behavior
{
Categories: [ 'PointOfInterestType' ],
Country: 'MYS',
Geometry: { Point: [ 101.71371, 3.15908 ] },
Interpolated: false,
Label: 'SEPHORA, Jalan Ampang, KLCC, Bandar Kuala Lumpur, Kuala Lumpur, 50450, Wilayah Persekutuan Kuala Lumpur, MYS',
Municipality: 'Bandar Kuala Lumpur',
PostalCode: '50450',
Region: 'Wilayah Persekutuan Kuala Lumpur',
SubMunicipality: 'KLCC',
SubRegion: 'Kuala Lumpur',
SupplementalCategories: [ 'Specialty Store' ]
}
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: