cmfcmf / docusaurus-search-local

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

version 1.2.0 fails building docusaurus in node version 22.11.0 #224

Closed micheleatzori closed 2 weeks ago

micheleatzori commented 1 month ago

Please describe the bug you are seeing

I've installed plugin version 1.2.0 and building my docusaurus website it raises the following error:

[ERROR] Error: Unable to build website for locale en.
    at tryToBuildLocale (/Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:54:19)
    at async /Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:65:9
    at async mapAsyncSequential (/Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
    at async Command.build (/Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
  [cause]: TypeError: Cannot read properties of undefined (reading 'load')
      at html2text (/Users/micheleatzori/smile.cx-docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/parse.js:79:33)
      at /Users/micheleatzori/smile.cx-docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:287:91
      at async Promise.all (index 0)
      at async Object.postBuild (/Users/micheleatzori/smile.cx-docs/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:284:26)
      at async /Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:187:9
      at async Promise.all (index 7)
      at async executePluginsPostBuild (/Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:183:5)
      at async buildLocale (/Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:143:5)
      at async tryToBuildLocale (/Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:47:13)
      at async /Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:65:9
      at async mapAsyncSequential (/Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
      at async Command.build (/Users/micheleatzori/smile.cx-docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5)
}

[INFO] Docusaurus version: 3.5.2 Node version: v22.11.0

Any idea to solve this? Thanks

How can we best reproduce the bug?

No response

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

├─┬ @cmfcmf/docusaurus-search-local@1.2.0 overridden
│ └── @docusaurus/core@3.5.2 deduped
├── @docusaurus/core@3.5.2
├─┬ @docusaurus/plugin-content-docs@3.5.2
│ └── @docusaurus/core@3.5.2 deduped
├─┬ @docusaurus/preset-classic@3.5.2
│ ├── @docusaurus/core@3.5.2 deduped
│ ├─┬ @docusaurus/plugin-content-blog@3.5.2
│ │ └── @docusaurus/core@3.5.2 deduped
│ ├─┬ @docusaurus/plugin-content-pages@3.5.2
│ │ └── @docusaurus/core@3.5.2 deduped
│ ├─┬ @docusaurus/plugin-debug@3.5.2
│ │ └── @docusaurus/core@3.5.2 deduped
│ ├─┬ @docusaurus/plugin-google-analytics@3.5.2
│ │ └── @docusaurus/core@3.5.2 deduped
│ ├─┬ @docusaurus/plugin-google-gtag@3.5.2
│ │ └── @docusaurus/core@3.5.2 deduped
│ ├─┬ @docusaurus/plugin-google-tag-manager@3.5.2
│ │ └── @docusaurus/core@3.5.2 deduped
│ ├─┬ @docusaurus/plugin-sitemap@3.5.2
│ │ └── @docusaurus/core@3.5.2 deduped
│ └─┬ @docusaurus/theme-search-algolia@3.5.2
│   └── @docusaurus/core@3.5.2 deduped
├─┬ @docusaurus/theme-classic@3.5.2
│ └── @docusaurus/core@3.5.2 deduped
└─┬ docusaurus-plugin-sass@0.2.5
  └── @docusaurus/core@3.5.2 deduped

Which Node.js version are you using?

v 22.11.0

Which theme are you using?

Yes, I am using @docusaurus/theme-classic

How does your plugin config look like?

No response

Additional context

No response

cmfcmf commented 2 weeks ago

Hi! This will be fixed by #228.