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

Docusaurus 3.5 #155

Closed
B4nan opened this issue Aug 14, 2024 · 3 comments · Fixed by #156
Closed

Docusaurus 3.5 #155

B4nan opened this issue Aug 14, 2024 · 3 comments · Fixed by #156

Comments

@B4nan
Copy link
Contributor

B4nan commented Aug 14, 2024

Looks like there are some small BCs in latest docusaurus, the build fails for every API page with

TypeError: internal.useDocsVersion is not a function
              at VersionBanner (server.bundle.js:278012:419)

Initial part of the logs, but I don't think that's relevant really:

[ERROR] Error: Unable to build website for locale en.
    at tryToBuildLocale (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:54:19)
    at async /Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:65:9
    at async mapAsyncSequential (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
    at async Command.build (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
  [cause]: Error: Docusaurus static site generation failed for 2707 paths:
  - "/api/2.7"
  - "/api/2.7/changelog"
...
      at generateStaticFiles (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/ssg.js:86:15)
      at async executeSSG (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:174:23)
      ... 4 lines matching cause stack trace ...
      at async Command.build (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
    [cause]: AggregateError
        at generateStaticFiles (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/ssg.js:87:20)
        at async executeSSG (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:174:23)
        at async buildLocale (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:134:31)
        at async tryToBuildLocale (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:47:13)
        at async /Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:65:9
        at async mapAsyncSequential (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
        at async Command.build (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
      [errors]: [
        Error: Can't render static file for pathname "/api/2.7"
            at generateStaticFile (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/ssg.js:119:15)
            at runNextTicks (node:internal/process/task_queues:60:5)
            at process.processImmediate (node:internal/timers:454:9)
            at async /Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/p-map/index.js:57:22 {
          [cause]: TypeError: internal.useDocsVersion is not a function
              at VersionBanner (server.bundle.js:278012:419)
              at Uc (server.bundle.js:282007:44)
              at Xc (server.bundle.js:282009:253)
              at Z (server.bundle.js:282015:89)
              at Yc (server.bundle.js:282018:98)
              at $c (server.bundle.js:282017:140)
              at Z (server.bundle.js:282015:345)
              at Yc (server.bundle.js:282018:98)
              at Xc (server.bundle.js:282010:145)
              at Z (server.bundle.js:282015:89)
        },
        Error: Can't render static file for pathname "/api/2.7/changelog"
            at generateStaticFile (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/ssg.js:119:15)
            at runNextTicks (node:internal/process/task_queues:60:5)
            at process.processImmediate (node:internal/timers:454:9)
            at async /Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/p-map/index.js:57:22 {
          [cause]: TypeError: internal.useDocsVersion is not a function
              at VersionBanner (server.bundle.js:278012:419)
              at Uc (server.bundle.js:282007:44)
              at Xc (server.bundle.js:282009:253)
              at Z (server.bundle.js:282015:89)
              at Yc (server.bundle.js:282018:98)
              at $c (server.bundle.js:282017:140)
              at Z (server.bundle.js:282015:345)
              at Yc (server.bundle.js:282018:98)
              at Xc (server.bundle.js:282010:145)
              at Z (server.bundle.js:282015:89)
        },
        Error: Can't render static file for pathname "/api/2.7/class/AbstractSqlDriver"
            at generateStaticFile (/Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/@docusaurus/core/lib/ssg.js:119:15)
            at runNextTicks (node:internal/process/task_queues:60:5)
            at process.processImmediate (node:internal/timers:454:9)
            at async /Users/adamek/htdocs/mikro-orm/mikro-orm/docs/node_modules/p-map/index.js:57:22 {
          [cause]: TypeError: internal.useDocsVersion is not a function
              at VersionBanner (server.bundle.js:278012:419)
              at Uc (server.bundle.js:282007:44)
              at Xc (server.bundle.js:282009:253)
              at Z (server.bundle.js:282015:89)
              at Yc (server.bundle.js:282018:98)
              at $c (server.bundle.js:282017:140)
              at Z (server.bundle.js:282015:345)
              at Yc (server.bundle.js:282018:98)
              at Xc (server.bundle.js:282010:145)
              at Z (server.bundle.js:282015:89)
        }, 
@B4nan
Copy link
Contributor Author

B4nan commented Aug 15, 2024

Should be just about changing those imports, works fine locally after I fixed them.

import { useDocsVersion } from '@docusaurus/theme-common/internal';

import { useDocsVersion } from '@docusaurus/theme-common/internal';

import { useDocsVersion } from '@docusaurus/theme-common/internal';

-@docusaurus/theme-common/internal
+@docusaurus/plugin-content-docs/client

MMMJB added a commit to MMMJB/docusaurus-plugin-typedoc-api that referenced this issue Aug 23, 2024
B4nan added a commit to mikro-orm/mikro-orm that referenced this issue Aug 27, 2024
B4nan added a commit to apify/crawlee that referenced this issue Aug 29, 2024
we need to wait for `docusaurus-plugin-typedoc-api` support

milesj/docusaurus-plugin-typedoc-api#155
@B4nan
Copy link
Contributor Author

B4nan commented Sep 2, 2024

any updates on this one @milesj?

@milesj
Copy link
Owner

milesj commented Sep 2, 2024

I don't have time to look into it, but feel free to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants