Skip to content

šŸ› fix build error for ā€œuseDocsVersionā€Ā #425

Open
@ReneWerner87

Description

@ReneWerner87

Error message: "Hook useDocsVersion is called outside the ."

https://github.com/gofiber/docs/actions/runs/10998175293

Log message
Error:  Error: Unable to build website for locale en.
    at tryToBuildLocale (/home/runner/work/docs/docs/node_modules/@docusaurus/core/lib/commands/build.js:54:[19](https://github.com/gofiber/docs/actions/runs/10998175293/job/30540727882#step:7:20))
[INFO] Docusaurus version: 3.4.0
    at async /home/runner/work/docs/docs/node_modules/@docusaurus/core/lib/commands/build.js:65:9
Node version: v[20](https://github.com/gofiber/docs/actions/runs/10998175293/job/30540727882#step:7:21).17.0
    at async mapAsyncSequential (/home/runner/work/docs/docs/node_modules/@docusaurus/utils/lib/jsUtils.js:20:24)
    at async Command.build (/home/runner/work/docs/docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
  [cause]: Error: Docusaurus static site generation failed for 19 paths:
  - "/storage/azureblob_v1.x.x/"
  - "/storage/azureblob_v1.x.x/arangodb/"
  - "/storage/azureblob_v1.x.x/azureblob/"
  - "/storage/azureblob_v1.x.x/badger/"
  - "/storage/azureblob_v1.x.x/bbolt/"
  - "/storage/azureblob_v1.x.x/couchbase/"
  - "/storage/azureblob_v1.x.x/dynamodb/"
  - "/storage/azureblob_v1.x.x/etcd/"
  - "/storage/azureblob_v1.x.x/memcache/"
  - "/storage/azureblob_v1.x.x/memory/"
  - "/storage/azureblob_v1.x.x/mongodb/"
  - "/storage/azureblob_v1.x.x/mssql/"
  - "/storage/azureblob_v1.x.x/mysql/"
  - "/storage/azureblob_v1.x.x/pebble/"
  - "/storage/azureblob_v1.x.x/postgres/"
  - "/storage/azureblob_v1.x.x/redis/"
  - "/storage/azureblob_v1.x.x/ristretto/"
  - "/storage/azureblob_v1.x.x/s3/"
  - "/storage/azureblob_v1.x.x/sqlite3/"
      at generateStaticFiles (/home/runner/work/docs/docs/node_modules/@docusaurus/core/lib/ssg.js:85:15)
      at async executeSSG (/home/runner/work/docs/docs/node_modules/@docusaurus/core/lib/commands/build.js:175:23)
      ... 4 lines matching cause stack trace ...
      at async Command.build (/home/runner/work/docs/docs/node_modules/@docusaurus/core/lib/commands/build.js:63:5) {
    [cause]: AggregateError
        at generateStaticFiles (/home/runner/work/docs/docs/node_modules/@docusaurus/core/lib/ssg.js:86:20)
              at Xc (server.bundle.js:517988:253)
              at Z (server.bundle.js:517994:89)
              at Xc (server.bundle.js:517992:231)
              at Z (server.bundle.js:517994:89)
              at Xc (server.bundle.js:517988:481)
              at Z (server.bundle.js:517994:89) {
            message: 'Hook useDocsVersion is called outside the <DocsVersionProvider>. '
          }
        },
        Error: Can't render static file for pathname "/storage/azureblob_v1.x.x/ristretto/"
            at generateStaticFile (/home/runner/work/docs/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 /home/runner/work/docs/docs/node_modules/p-map/index.js:57:[22](https://github.com/gofiber/docs/actions/runs/10998175293/job/30540727882#step:7:23) {
          [cause]: ReactContextError
              at useDocsVersion (server.bundle.js:509432:128)
              at useDocRootMetadata (server.bundle.js:509707:[23](https://github.com/gofiber/docs/actions/runs/10998175293/job/30540727882#step:7:24)2)
              at DocRoot (server.bundle.js:508205:98)
              at Uc (server.bundle.js:517986:44)
              at Xc (server.bundle.js:517988:253)
              at Z (server.bundle.js:517994:89)
              at Xc (server.bundle.js:517992:231)
              at Z (server.bundle.js:517994:89)
              at Xc (server.bundle.js:517988:481)
              at Z (server.bundle.js:517994:89) {
            message: 'Hook useDocsVersion is called outside the <DocsVersionProvider>. '
          }
        },
        Error: Can't render static file for pathname "/storage/azureblob_v1.x.x/s3/"
            at generateStaticFile (/home/runner/work/docs/docs/node_modules/@docusaurus/core/lib/ssg.js:119:15)
            at async /home/runner/work/docs/docs/node_modules/p-map/index.js:57:22 {
          [cause]: ReactContextError
              at useDocsVersion (server.bundle.js:509432:128)
              at useDocRootMetadata (server.bundle.js:509707:232)
              at DocRoot (server.bundle.js:508205:98)
              at Uc (server.bundle.js:517986:44)
              at Xc (server.bundle.js:517988:[25](https://github.com/gofiber/docs/actions/runs/10998175293/job/30540727882#step:7:26)3)
              at Z (server.bundle.js:517994:89)
              at Xc (server.bundle.js:517992:231)
              at Z (server.bundle.js:517994:89)
              at Xc (server.bundle.js:517988:481)
              at Z (server.bundle.js:517994:89) {
            message: 'Hook useDocsVersion is called outside the <DocsVersionProvider>. '
          }
        },
        Error: Can't render static file for pathname "/storage/azureblob_v1.x.x/sqlite3/"
            at generateStaticFile (/home/runner/work/docs/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 /home/runner/work/docs/docs/node_modules/p-map/index.js:57:22 {
          [cause]: ReactContextError
              at useDocsVersion (server.bundle.js:509432:1[28](https://github.com/gofiber/docs/actions/runs/10998175293/job/30540727882#step:7:29))
              at useDocRootMetadata (server.bundle.js:509707:232)
              at DocRoot (server.bundle.js:508205:98)
              at Uc (server.bundle.js:517986:44)
              at Xc (server.bundle.js:517988:253)
              at Z (server.bundle.js:517994:89)
              at Xc (server.bundle.js:517992:2[31](https://github.com/gofiber/docs/actions/runs/10998175293/job/30540727882#step:7:32))
              at Z (server.bundle.js:517994:89)
              at Xc (server.bundle.js:517988:481)
              at Z (server.bundle.js:517994:89) {
            message: 'Hook useDocsVersion is called outside the <DocsVersionProvider>. '
          }
        }
      ]
    }
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions