Skip to content
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

[bug]: TS error: saveObjects method is missing from SearchIndex type #1578

Open
aqandrew opened this issue Jan 14, 2025 · 0 comments
Open

[bug]: TS error: saveObjects method is missing from SearchIndex type #1578

aqandrew opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@aqandrew
Copy link

Description

We have a Next.js/DatoCMS site with TypeScript, in the process of adding Algolia search.

Following this guide, which provides a JS code example: https://www.datocms.com/blog/algolia-nextjs-how-to-add-algolia-instantsearch#build-a-next-js-api-to-upload-your-data-to-your-algolia-index

When converted to TypeScript, TS says that SearchIndex does not have a property named saveObjects.

Reproduced here: https://stackblitz.com/edit/vitejs-vite-w8v8abc6?file=src%2Falgolia-sync.ts

Client

All

Version

4.14.2

Relevant log output

Property 'saveObjects' does not exist on type 'SearchIndex'.(2339)
@aqandrew aqandrew added the bug label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant