Solution skill
Latest release breaks algoliasearch types
Complete solution
Shows how to fix latest release breaks algoliasearch types. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The algoliasearch release that broke TypeScript types (re-exported types going missing in dependent packages) was fixed in 5.10.2. Issue algolia/algoliasearch-client-javascript#1562 (closed, 13 comments): ### Description In 5.9.0 (migrating from 5.8.1), types are broken for algoliasearch.
Steps
- The algoliasearch release that broke TypeScript types (re-exported types going missing in dependent packages) was fixed in 5.10.2.
- Issue algolia/algoliasearch-client-javascript#1562 (closed, 13 comments): ### Description In 5.9.0 (migrating from 5.8.1), types are broken for algoliasearch.
When to use
You are seeing this: Issue algolia/algoliasearch-client-javascript#1562 (closed, 13 comments): ### Description In 5.9.0 (migrating from 5.8.1), types are broken for algoliasearch. Use this skill when you run into "Latest release breaks algoliasearch types".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 5.9.0, 5.8.1, 5.10.2. If you are on something much newer or older, the details may have shifted.
Why this happens
From my quick investigation, the package references types from @algolia/client-search, however this is not a dependency of algoliasearch and causes TypeScript to return any.
Sources
- https://github.com/algolia/algoliasearch-client-javascript/issues/1562
Evidence
In https://github.com/algolia/algoliasearch-client-javascript/issues/1562, the reporter asked: Issue algolia/algoliasearch-client-javascript#1562 (closed, 13 comments): ### Description In 5.9.0 (migrating from 5.8.1), types are broken for algoliasearch. From my quick investigation, the package references types from @algolia/client-search, however this is not a dependency of algoliasearch and causes TypeScript to return any. Other types that were previously accessible, like SearchResponses are no longer available. ``ts algoliasearch(appId: string, apiKey value [redacted] options?: any): any `` ### Client All ### Version 5.9.0 ### Relevant log output No response The verified answer: The algoliasearch release that broke TypeScript types (re-exported types going missing in dependent packages) was fixed in 5.10.2. Upgrade to 5.10.2+. Source thread: https://github.com/algolia/algoliasearch-client-javascript/issues/1562
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_s1nDKUKhfZzvnCd6jIEjyA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Latest release breaks algoliasearch types <span>— Vectle</span></a>