Solving An Issue with Typesense-js in Sveltekit Production
TLDR Francois reported an issue where a static value in typesense-js was undefined in Sveltekit's production. Jason helped debug the issue, suspecting a build problem or a circular dependency. Francois's solution eliminated this error and was tested, approved, and finally merged by Jason.
Jan 06, 2022 (20 months ago)
The line in question is here, on
Documents.RESOURCEPATHwas null because
SearchOnlyDocumentand static getter are not properly extended, but then it would seem TypeScript should detect that and fail
2- The circular dependency between
./SearchOnlyDocuments.tsis causing some issues at build-time by Vite
Documents.RESOURCEPATHwas super important here, and I don't know about the in-and-outs enough 😛
default, so I'm wondering if this is a Vite issue instead (since it works properly in dev mode)
const RESOURCEPATH = '/documents'is defined in
Documents.RESOURCEPATHactually comes from
The only thing I can see that wouldn't work with my fix is if people used to do something like
typesensemodule.Documents.RESOURCEPATH = '/somethingelse', it would not be taken into account in
SearchOnlyDocuments, but I hope people are not doing this 😂
1.1.3-0. Could you give it a shot now?
Jan 07, 2022 (20 months ago)
Indexed 2764 threads (79% resolved)
Typesense-JS Client Types Importation Problem.
Stefan had problems importing types from typesense-JS, causing compiler slowdowns. Jason and Damian provided guidance and agreed to export necessary types from Typesense.ts, improving import speed and reducing compiler checks.
Handling Kinesis Stream Event Batching with Typesense
Dui had questions about how to handle Kinesis stream events with Typesense. Kishore Nallan suggested using upsert mode for creation/update and differentiating with logical deletion. After various discussions including identifying and resolving a bug, they finalized to introduce an `emplace` action in Typesense v0.23.
Typescript Support and Import Issues with Typesense
Ahmad faced trouble with Typesense support for Typescript. Jason assisted by suggesting checks and solutions. Phil suggested modifying the import statement. Ultimately, the issue was resolved with a change from Jason in version `v1.1.2`.
Troubleshooting TypeScript Error with Typesense
GM experienced an error with Typesense in TypeScript, requiring help to correct the issues. Jason helped propose solutions and adjustments to the code. Ultimately, they were able to resolve the errors and successfully implement a search function.
Troubleshooting Issues with DocSearch Hits and Scraper Configuration
Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.