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

Error: prefix must not start with a /. This is a bug. #136

Closed
dustinlacewell opened this issue Aug 24, 2022 · 1 comment · May be fixed by mdomorffaruk/dispatch#4 or tahabiyikli/dispatch1#2
Closed
Labels
bug Something isn't working

Comments

@dustinlacewell
Copy link

Please describe the bug you are seeing

When building my site I get the following:

[Local Search] [INFO]: Gathering documents
[ERROR] Unable to build website for locale en.
[ERROR] Error: prefix must not start with a /. This is a bug.
    at urlMatchesPrefix (/Users/dustinlacewell/src/volley-docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:17:15)
    at /Users/dustinlacewell/src/volley-docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:224:29
    at Array.flatMap (<anonymous>)
    at Object.postBuild (/Users/dustinlacewell/src/volley-docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:210:18)
    at /Users/dustinlacewell/src/volley-docs/node_modules/@docusaurus/core/lib/commands/build.js:171:22
    at Array.map (<anonymous>)
    at buildLocale (/Users/dustinlacewell/src/volley-docs/node_modules/@docusaurus/core/lib/commands/build.js:167:31)
    at async tryToBuildLocale (/Users/dustinlacewell/src/volley-docs/node_modules/@docusaurus/core/lib/commands/build.js:38:20)
    at async mapAsyncSequential (/Users/dustinlacewell/src/volley-docs/node_modules/@docusaurus/utils/lib/jsUtils.js:34:24)
    at async Command.build (/Users/dustinlacewell/src/volley-docs/node_modules/@docusaurus/core/lib/commands/build.js:73:21)
[INFO] Docusaurus version: 2.0.1
Node version: v18.4.0

How can we best reproduce the bug?

No response

Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?

npm list '@docusaurus/core' '@cmfcmf/docusaurus-search-local'                                                                                                                                                                    ~/src/volley-docs
[email protected] /Users/dustinlacewell/src/volley-docs
├─┬ @cmfcmf/[email protected]
│ └── @docusaurus/[email protected] deduped
├── @docusaurus/[email protected]
├─┬ @docusaurus/[email protected]
│ └── @docusaurus/[email protected] deduped
├─┬ @docusaurus/[email protected]
│ ├── @docusaurus/[email protected] deduped
│ ├─┬ @docusaurus/[email protected]
│ │ └── @docusaurus/[email protected] deduped
│ ├─┬ @docusaurus/[email protected]
│ │ └── @docusaurus/[email protected] deduped
│ ├─┬ @docusaurus/[email protected]
│ │ └── @docusaurus/[email protected] deduped
│ ├─┬ @docusaurus/[email protected]
│ │ └── @docusaurus/[email protected] deduped
│ ├─┬ @docusaurus/[email protected]
│ │ └── @docusaurus/[email protected] deduped
│ ├─┬ @docusaurus/[email protected]
│ │ └── @docusaurus/[email protected] deduped
│ ├─┬ @docusaurus/[email protected]
│ │ └── @docusaurus/[email protected] deduped
│ └─┬ @docusaurus/[email protected]
│   └── @docusaurus/[email protected] deduped
└─┬ [email protected]
  └── @docusaurus/[email protected] deduped

Which Node.js version are you using?

v18.4.0

Which theme are you using?

Yes, I am using @docusaurus/theme-classic

How does your plugin config look like?

        [require.resolve("@cmfcmf/docusaurus-search-local"),
        {
            indexPages: true,
        }],

Additional context

No response

@dustinlacewell dustinlacewell added the bug Something isn't working label Aug 24, 2022
@aleksimo
Copy link

aleksimo commented Nov 8, 2022

Caught the same bug. I suppose, it's somehow connected with the Multidoc feature. When I add the plugin to a newly installed instance, everything works fine. But, once I place articles in the root folder next to /docs (and make some versioned), the build fails with this very error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants