Skip to content

methods[key] is not a function in 4.23.0 #1511

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

Closed
Enngage opened this issue Mar 26, 2024 · 3 comments · Fixed by #1512
Closed

methods[key] is not a function in 4.23.0 #1511

Enngage opened this issue Mar 26, 2024 · 3 comments · Fixed by #1512

Comments

@Enngage
Copy link

Enngage commented Mar 26, 2024

Hello,

We started receiving following error when upgrading from 4.22.1 to 4.23.0. No change in code, just the bump up of the npm package.

TypeError: methods[key] is not a function
   at c:\dev\kontent-ai-learn-fe\.next\server\chunks\node_modules_1a6303._.js:6521:33
   at Array.forEach (<anonymous>)
   at Module.addMethods (c:\dev\kontent-ai-learn-fe\.next\server\chunks\node_modules_1a6303._.js:6519:26)
   at Module.createSearchClient (c:\dev\kontent-ai-learn-fe\.next\server\chunks\node_modules_1a6303._.js:7352:202)
   at Module.algoliasearch (c:\dev\kontent-ai-learn-fe\.next\server\chunks\node_modules_1a6303._.js:8912:25)
   at initAlgoliaSearchClient

Cheers!

@shortcuts
Copy link
Member

shortcuts commented Mar 26, 2024

cc @dhayab the methods listed here https://github.com/algolia/algoliasearch-client-javascript/pull/1509/files#diff-24b438c650124b5fa554b87c388a4381214d893bcd98dae3cf0fb87c7210fbd6R359-R365 should be in a createRecommendClient call not at the root of the search client, because it won't be able to find them

weird that the CI did not caught that

@dhayab
Copy link
Member

dhayab commented Mar 26, 2024

Thanks for your report @Enngage. We've just released [email protected] which includes a fix for the issue you've been experiencing.

@shortcuts
Copy link
Member

thanks for tackling this quickly @dhayab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants