Skip to content

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'map') #29

Open
@Zamiell

Description

@Zamiell

Description

Hello,

I am a brand new TypeSense user. I am trying to move my existing Docusaurus website from Algolia --> TypeSense. I followed the steps from the documentation, and I cannot get it working.

My Docusaurus site is published to: https://isaacscript.github.io/

When attempting to type anything into the search, I get the following error in the JavaScript console:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'map')
    at t.value (37702.a034fb89.js:2:3949)
    at t.value (37702.a034fb89.js:2:8672)
    at 90888.529c7e8f.js:1:56429
    at p (37702.a034fb89.js:2:105125)
    at Generator.<anonymous> (37702.a034fb89.js:2:106462)
    at Generator.next (37702.a034fb89.js:2:105488)
    at jt (90888.529c7e8f.js:1:55241)
    at i (90888.529c7e8f.js:1:56585)

More Info

I am self-hosting TypeSense. I can see what the version is from the log file:

I20230208 07:07:05.562175 480505 typesense_server_utils.cpp:357] Starting Typesense 0.24.0

My "typesense-server.ini" looks like this:

; Typesense Configuration

[server]

api-address = 0.0.0.0
api-port = 8108
data-dir = /var/lib/typesense
api-key = 9AiKF0AGD145wC9fc4NafATcCam89XT7v2NxGf2ymFucN7b6
log-dir = /var/log/typesense

And the config in my "docusaurus.config.js" file is this:

      typesense: {
        typesenseCollectionName: "isaacscript",
        typesenseServerConfig: {
          nodes: [
            {
              host: "isaacracing.net",
              port: 8108,
              protocol: "https",
            },
          ],
          apiKey: "9AiKF0AGD145wC9fc4NafATcCam89XT7v2NxGf2ymFucN7b6",
        },

        typesenseSearchParameters: {},

        contextualSearch: true,
      },

For reference, the "docusaurus.config.js" file is located here:
https://github.com/IsaacScript/isaacscript/blob/main/packages/docs/docusaurus.config.js

Furthermore, I am using the following version of the plugin, which is located in my "package.json" file:

    "docusaurus-theme-search-typesense": "^0.9.0",

For reference, the "package.json" file is located here:
https://github.com/IsaacScript/isaacscript/blob/main/package.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions