TypeError when trying to query autocomplete

I’m currently working on a Next.js/React.js project trying to implement autocomplete. I get the following error when trying to type within autocomplete's search bar:

Uncaught TypeError: Cannot add property __, object is not extensible
    at m (preact.module.js?7eca:1)
    at j (preact.module.js?7eca:1)
    at I (preact.module.js?7eca:1)
    at m (preact.module.js?7eca:1)
    at j (preact.module.js?7eca:1)
    at I (preact.module.js?7eca:1)
    at m (preact.module.js?7eca:1)
    at j (preact.module.js?7eca:1)
    at I (preact.module.js?7eca:1)
    at m (preact.module.js?7eca:1)
    at j (preact.module.js?7eca:1)
    at I (preact.module.js?7eca:1)
    at m (preact.module.js?7eca:1)
    at I (preact.module.js?7eca:1)
    at m (preact.module.js?7eca:1)
    at I (preact.module.js?7eca:1)
    at N (preact.module.js?7eca:1)
    at defaultRender (getDefaultOptions.js?6d62:47)
    at renderPanel (render.js?c304:136)
    at scheduleRender (autocomplete.js?0a76:140)
    at eval (autocomplete.js?0a76:181)
    at eval (debounce.js?536d:13)
    at b (index.esm.js?19e4:4)




I use the following initialization and I couldn’t figure what’s wrong yet:

const autocompleteSearch = autocomplete({
            container: "#autocomplete",
            placeholder: "Test",
            getSources({ query }) {
                return [
                    {
                        sourceId: "vehicles",
                        getItems() {
                            return getAlgoliaResults({
                                searchClient: clientRef.current,
                                queries: [
                                    {
                                        indexName: getSearchIndex("default"),
                                        query,
                                        params: {
                                            hitsPerPage: 4,
                                        },
                                    },
                                ],
                            });
                        },
                        templates: {
                            item({ item, components }) {
                                return <components.Highlight hit={item} attribute="name" />;
                            },
                        },
                    },
                ];
            },
        });

Has anybody ever had an error message like this or does know what the message is about?