cmfcmf / docusaurus-search-local

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

v3.6.0 docusaurus upgrade failure #226

Open roma-228 opened 1 week ago

roma-228 commented 1 week ago

Please describe the bug you are seeing

I want to upgrade my site from version 3.0.0 to the latest version 3.6.0 But I am getting an error My site builds successfully on version 3.4.0

Error: Can't render static file for pathname "/docs/hrp/vacation-planning"
            at generateStaticFile (C:\Users\rodav\Docusaurus Engine\www\node_modules\@docusaurus\core\lib\ssg\ssg.js:167:15)
            at processTicksAndRejections (node:internal/process/task_queues:95:5)
            at runNextTicks (node:internal/process/task_queues:64:3)
            at process.processImmediate (node:internal/timers:449:9)
            at async C:\Users\rodav\Docusaurus Engine\www\node_modules\p-map\index.js:57:22 {
          [cause]: TypeError: (0 , internal_namespaceObject.isActiveSidebarItem) is not a function
              at DocSidebarItemLink (server.bundle.js:92829:192)
              at Uc (server.bundle.js:101105:44)
              at Xc (server.bundle.js:101107:253)
              at Z (server.bundle.js:101113:89)
              at Xc (server.bundle.js:101107:481)
              at Z (server.bundle.js:101113:89)
              at Yc (server.bundle.js:101116:98)
              at $c (server.bundle.js:101115:140)
              at Z (server.bundle.js:101113:345)
              at Xc (server.bundle.js:101111:231)
        },

My package.json

"dependencies": {
    "@docusaurus/core": "^3.0.0",
    "@docusaurus/preset-classic": "^3.0.0",
    "@docusaurus/theme-mermaid": "^3.0.0",
    "@docusaurus/theme-search-algolia": "^3.0.0",
    "@mdx-js/react": "^3.0.0",
    "@types/react": "^18.2.37",
    "clsx": "^2.0.0",
    "prism-react-renderer": "2.3.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0"
  },
  "devDependencies": {
    "@docusaurus/module-type-aliases": "^3.0.0",
    "@docusaurus/types": "^3.0.0",
    "@tsconfig/docusaurus": "^1.0.5",
    "typescript": "^5.5.2"
  },
  "browserslist": {
    "production": [
      ">0.5%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "engines": {
    "node": ">=20.9"
  }

How can we best reproduce the bug?

On version 3.4.0 and below everything works and on higher versions I get the problem including 3.5.2 and 3.6.0

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

yarn list v1.22.19
├─ @docusaurus/babel@3.6.0
├─ @docusaurus/bundler@3.6.0
├─ @docusaurus/core@3.6.0
├─ @docusaurus/cssnano-preset@3.6.0
├─ @docusaurus/logger@3.6.0
├─ @docusaurus/mdx-loader@3.6.0
├─ @docusaurus/module-type-aliases@3.6.0
├─ @docusaurus/plugin-content-blog@3.6.0
├─ @docusaurus/plugin-content-docs@3.6.0
├─ @docusaurus/plugin-content-pages@3.6.0
├─ @docusaurus/plugin-debug@3.6.0
├─ @docusaurus/plugin-google-analytics@3.6.0
├─ @docusaurus/plugin-google-gtag@3.6.0
├─ @docusaurus/plugin-google-tag-manager@3.6.0
├─ @docusaurus/plugin-sitemap@3.6.0
├─ @docusaurus/preset-classic@3.6.0
├─ @docusaurus/theme-classic@3.6.0
├─ @docusaurus/theme-common@3.6.0
├─ @docusaurus/theme-mermaid@3.6.0
├─ @docusaurus/theme-search-algolia@3.6.0
├─ @docusaurus/theme-translations@3.6.0
├─ @docusaurus/types@3.6.0
├─ @docusaurus/utils-common@3.6.0
├─ @docusaurus/utils-validation@3.6.0
└─ @docusaurus/utils@3.6.0
Done in 0.48s.

Which Node.js version are you using?

20.9

Which theme are you using?

No, I am using a custom theme

How does your plugin config look like?

No response

Additional context

No response

Icexist commented 1 day ago

Try adding the following to your package.json file as a workaround, but I expect it won't be necessary for very long.

"overrides": {
  "@cmfcfm/docusaurus-search-local": {
    "@docusaurus/core": "^3.1.1",
    "cheerio": "1.0.0-rc.12"
  }
}

This builds just fine for me on Docusaurus 3.6.1