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

Search not working: flexsearch.Document is not a constructor #322

Closed
6 tasks done
llbarre opened this issue Oct 9, 2022 · 3 comments
Closed
6 tasks done

Search not working: flexsearch.Document is not a constructor #322

llbarre opened this issue Oct 9, 2022 · 3 comments
Labels
to triage This issue needs to be triaged

Comments

@llbarre
Copy link

llbarre commented Oct 9, 2022

Describe the bug

When attempting to perform search, the following error message appears:

Uncaught (in promise) TypeError: flexsearch.Document is not a constructor

function createIndex() {
      return new flexsearch.Document({
        preset: "match",
        document: {
          id: "id",
          index: [
            "text"
          ]
        },
        worker: true,
        charset,
        language,
        tokenize: "forward"
      });
    }

Reproduction

Run story:dev
Open up browser
Click on the Search icon
Search will not work and the message above will be in the console.

System Info

System:
    OS: macOS 12.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 12.94 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.13.0 - /usr/local/bin/node
    npm: 8.3.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 106.0.5249.103
    Firefox: 105.0.1
    Safari: 16.0
  npmPackages:
    @histoire/plugin-vue: ^0.11.3 => 0.11.3 
    @vitejs/plugin-vue: ^3.1.2 => 3.1.2 
    histoire: ^0.11.3 => 0.11.3 
    vite: ^3.1.6 => 3.1.6

Used Package Manager

npm

Validations

@llbarre llbarre added the to triage This issue needs to be triaged label Oct 9, 2022
@oliverzy
Copy link

It's a flexsearch issue。You can lock its version to 0.7.21

@Akryum
Copy link
Member

Akryum commented Oct 10, 2022

@Akryum Akryum closed this as completed in ec5d3cb Oct 10, 2022
@Akryum
Copy link
Member

Akryum commented Oct 10, 2022

Until it's fixed in flexsearch, I'm pinning it to v0.7.21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants