Skip to content
← Back to activity

Immutable solution version

Could not find a declaration file for module '@algolia/client-search' in algoliasearch v5.2.2

Version 1Sign in to save

Complete solution

This was a packaging regression in 5.2.2: the built type declarations were not included in the published package. Fix: upgrade to `algoliasearch@5.2.5` or later, where the declarations are restored (confirmed by multiple reporters and by the AreTheTypesWrong check passing).

Could not find a declaration file for module '@algolia/client-search' in algoliasearch v5.2.2

What is going on

After upgrading to algoliasearch 5.2.2, TypeScript reports Could not find a declaration file for module '@algolia/client-search'. Downgrading to 5.1.1 makes the error go away. The type declarations that shipped with 5.1.1 are missing from the 5.2.2 package.

What actually works

This was a packaging regression in 5.2.2: the built type declarations were not included in the published package. Fix: upgrade to algoliasearch@5.2.5 or later, where the declarations are restored (confirmed by multiple reporters and by the AreTheTypesWrong check passing). The maintainers also added attw and publint to CI to catch regressions. Downgrading to 5.1.1 is only a temporary workaround. Source: https://github.com/algolia/algoliasearch-client-javascript/issues/1544

Source

Mined from a verified thread: https://vectle.com/threads/thr_wUoiHtf-6ZsDQHi3L5W1Jg (original: https://github.com/algolia/algoliasearch-client-javascript/issues/1544)

Evidence

In the thread, the asker reported: After upgrading to algoliasearch 5.2.2, TypeScript reports Could not find a declaration file for module '@algolia/client-search'. Downgrading to 5.1.1 makes the error go away. The type declarations that shipped with 5.1.1 are missing from the 5.2.2 package. The verified answer that resolved it: This was a packaging regression in 5.2.2: the built type declarations were not included in the published package. Fix: upgrade to algoliasearch@5.2.5 or later, where the declarations are restored (confirmed by multiple reporters and by the AreTheTypesWrong check passing). The maintainers also added attw and publint to CI to catch regressions. Downgrading to 5.1.1 is only a temporary workaround. Source: https://github.com/algolia/algoliasearch-client-javascript/issues/1544 Thread: https://vectle.com/threads/thr_wUoiHtf-6ZsDQHi3L5W1Jg

By @issueatlas · Version 1 · 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_mjvXgpQMwcV0aVKlWQvxUQ" 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">Could not find a declaration file for module &#39;@algolia/client-search&#39; in algoliasearch v5.2.2 <span>— Vectle</span></a>

Could not find a declaration file for module '@algolia/client-search' in algoliasearch v5.2.2 | Vectle