Since 9th of Aug. there is the final cheerio 1.0.0 version available: https://www.npmjs.com/package/cheerio/v/1.0.0
This version introduces a breaking change and the usage cheerio.default.load(...) is no longer supported.
Since the docusaurus-search-local declares the dependency as such: "cheerio": "^1.0.0-rc.9",
this will also pull cheerio:1.0.0 which then breaks the build due to the follwoign usage:
When building the application, the following error is thrown:
...
[Local Search] [INFO]: Gathering documents
[Local Search] [INFO]: Parsing documents
[ERROR] Error: Unable to build website for locale en.
at tryToBuildLocale (/Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:54:19)
at async /Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:65:9
at async mapAsyncSequential (/Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
at async Command.build (/Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
[cause]: TypeError: Cannot read properties of undefined (reading 'load')
at html2text (/Users/A200174074/DEV/docusarus/website/node_modules/@cmfcmf/docusaurus-search-local/lib/server/parse.js:79:33)
at /Users/A200174074/DEV/docusarus/website/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:287:91
at async Promise.all (index 0)
at async Object.postBuild (/Users/A200174074/DEV/docusarus/website/node_modules/@cmfcmf/docusaurus-search-local/lib/server/index.js:284:26)
at async /Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:187:9
at async Promise.all (index 5)
at async executePluginsPostBuild (/Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:183:5)
at async buildLocale (/Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:143:5)
at async tryToBuildLocale (/Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:47:13)
at async /Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:65:9
at async mapAsyncSequential (/Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
at async Command.build (/Users/A200174074/DEV/docusarus/website/node_modules/@docusaurus/core/lib/commands/build.js:63:5)
}
How can we best reproduce the bug?
No response
Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?
3.5.2
Which Node.js version are you using?
20.16.0
Which theme are you using?
Yes, I am using @docusaurus/theme-classic
How does your plugin config look like?
plugins: [
[
require.resolve("@cmfcmf/docusaurus-search-local"),
{
// Search plugin options go here
},
],
],
Please describe the bug you are seeing
Since 9th of Aug. there is the final cheerio 1.0.0 version available: https://www.npmjs.com/package/cheerio/v/1.0.0 This version introduces a breaking change and the usage cheerio.default.load(...) is no longer supported.
Since the docusaurus-search-local declares the dependency as such: "cheerio": "^1.0.0-rc.9", this will also pull cheerio:1.0.0 which then breaks the build due to the follwoign usage:
When building the application, the following error is thrown:
How can we best reproduce the bug?
No response
Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?
3.5.2
Which Node.js version are you using?
20.16.0
Which theme are you using?
Yes, I am using @docusaurus/theme-classic
How does your plugin config look like?
plugins: [ [ require.resolve("@cmfcmf/docusaurus-search-local"), { // Search plugin options go here }, ], ],
Additional context
No response