Docusaurus 3.5
Closed this issue · 3 comments
B4nan commented
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 commented
Should be just about changing those imports, works fine locally after I fixed them.
-@docusaurus/theme-common/internal
+@docusaurus/plugin-content-docs/client
milesj commented
I don't have time to look into it, but feel free to submit a PR.