cmfcmf / docusaurus-search-local

Offline / Local Search for Docusaurus v2. Try it live at:
https://cmfcmf.github.io/OpenWeatherMap-PHP-API/
MIT License
446 stars 67 forks source link

Parsing documents Error: This should not be reached (debug: got type style) #7

Closed equinusocio closed 4 years ago

equinusocio commented 4 years ago

Bug description

I get this error while bulding:

✔ Server
  Compiled successfully in 42.82s

[Local Search] [INFO]: Gathering documents
[Local Search] [INFO]: Parsing documents
Error: This should not be reached (debug: got type style)

Environment

Package Versions

yarn list v1.17.3
├─ @cmfcmf/docusaurus-search-local@0.1.2
├─ @docusaurus/core@2.0.0-alpha.48
├─ @docusaurus/mdx-loader@2.0.0-alpha.48
├─ @docusaurus/plugin-content-blog@2.0.0-alpha.48
├─ @docusaurus/plugin-content-docs@2.0.0-alpha.48
├─ @docusaurus/plugin-content-pages@2.0.0-alpha.48
├─ @docusaurus/plugin-google-analytics@2.0.0-alpha.48
├─ @docusaurus/plugin-google-gtag@2.0.0-alpha.48
├─ @docusaurus/plugin-ideal-image@2.0.0-alpha.48
├─ @docusaurus/plugin-sitemap@2.0.0-alpha.48
├─ @docusaurus/preset-classic@2.0.0-alpha.48
├─ @docusaurus/theme-classic@2.0.0-alpha.48
├─ @docusaurus/theme-live-codeblock@2.0.0-alpha.48
├─ @docusaurus/theme-search-algolia@2.0.0-alpha.48
├─ @docusaurus/types@2.0.0-alpha.48
└─ @docusaurus/utils@2.0.0-alpha.48

Node Version

v11.15.0

Docusaurus Environment

plugins: [
    path.resolve(__dirname, 'plugins/custom-webpack-plugin'),
    '@docusaurus/plugin-ideal-image',
    ['@cmfcmf/docusaurus-search-local', {
      indexBlog: false
    }]
  ],

Additional context

I've just installed and configured the plugin.

cmfcmf commented 4 years ago

Hi @equinusocio, thank you for the bug report! This should be fixed in https://github.com/cmfcmf/docusaurus-search-local/commit/3c3299e32545cf4570c182ac89bd2ae09281755a#diff-2640b069532a764d5339506bc1214e4a. Could you apply this two-line change to the parse.js file locally and see if it fixes the build for you?

equinusocio commented 4 years ago

@cmfcmf Yes, it worked! Will you release it soon?

cmfcmf commented 4 years ago

@cmfcmf Yes, it worked! Will you release it soon?

Of course! I just released version 0.1.3 :tada: