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 failed to build when using redocusaurus > 1.1.2 #209

Closed
haobinliang opened this issue Jun 17, 2022 · 5 comments · Fixed by #210
Closed

Docusaurus failed to build when using redocusaurus > 1.1.2 #209

haobinliang opened this issue Jun 17, 2022 · 5 comments · Fixed by #210
Labels
bug Something isn't working builds needs-reproduction

Comments

@haobinliang
Copy link

Hi Rohit,

I am using [email protected]; but I can only successfully build the site when using [email protected] and below. If I use higher version of redocusaurus, I get this error. Any help on troubleshooting if possible please?

 Executing task: yarn run build <

yarn run v1.22.17
$ docusaurus build
[INFO] [en] Creating an optimized production build...

✔ Client
  

✖ Server
  Compiled with some errors in 22.96s

[ERROR] Docusaurus server-side rendering could not render static page with path /api/marketplace/v2.
[ERROR] Docusaurus server-side rendering could not render static page with path /api/platform.


TypeError: this.searchWorker.terminate is not a function
TypeError: this.searchWorker.terminate is not a function
[ERROR] Unable to build website for locale en.
[ERROR] Error: Failed to compile with errors.
    at /Users/haobinliang/capitalise-developer-portal/node_modules/@docusaurus/core/lib/webpack/utils.js:180:24
    at /Users/haobinliang/capitalise-developer-portal/node_modules/webpack/lib/MultiCompiler.js:554:14
    at processQueueWorker (/Users/haobinliang/capitalise-developer-portal/node_modules/webpack/lib/MultiCompiler.js:491:6)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The terminal process "/bin/zsh '-c', 'yarn run build'" terminated with exit code: 1.

docusaurus.config.js

const config = {
  presets: [
    /** ************ Redocusaurus Config *********** */
    [
      "redocusaurus",
      {
        specs: [
          {
            id: "platform-v1",
            spec: "./openapi/platform-v1.yaml",
            route: "/api/platform",
          },
          {
            id: "marketplace-v1",
            spec: "./openapi/marketplace-v1.yaml",
            route: "/api/marketplace/v1",
          },
          {
            id: "marketplace-v2",
            spec: "./openapi/marketplace-v2.yaml",
            route: "/api/marketplace/v2",
          },
        ]
      }
    ]
  ]
}

package.json

{
  "name": "capialise-developer-portal",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "docusaurus": "docusaurus",
    "start": "docusaurus start",
    "build": "docusaurus build",
    "swizzle": "docusaurus swizzle",
    "deploy": "docusaurus deploy",
    "clear": "docusaurus clear",
    "serve": "docusaurus serve",
    "write-translations": "docusaurus write-translations",
    "write-heading-ids": "docusaurus write-heading-ids",
    "typecheck": "tsc"
  },
  "dependencies": {
    "@cmfcmf/docusaurus-search-local": "^0.11.0",
    "@docusaurus/core": "2.0.0-beta.21",
    "@docusaurus/plugin-ideal-image": "^2.0.0-beta.21",
    "@docusaurus/preset-classic": "2.0.0-beta.21",
    "@docusaurus/theme-live-codeblock": "^2.0.0-beta.21",
    "@mdx-js/react": "^1.6.22",
    "clsx": "^1.1.1",
    "mdx-mermaid": "^1.2.2",
    "mermaid": "^9.0.1",
    "prism-react-renderer": "^1.3.1",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "redocusaurus": "^1.2.1" 
  },
  "devDependencies": {
    "@docusaurus/module-type-aliases": "2.0.0-beta.21",
    "@tsconfig/docusaurus": "^1.0.5",
    "autoprefixer": "^10.4.4",
    "postcss": "^8.4.12",
    "typescript": "^4.6.3"
  },
  "browserslist": {
    "production": [
      ">0.5%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
@rohit-gohri
Copy link
Owner

Hey, I can't work on this without a minimal reproduction. Since the latest version does work with the petstore yaml. I can't do much from the error log because there is no stack trace for TypeError: this.searchWorker.terminate is not a function (due to this open issue: facebook/docusaurus#7456 )

@rohit-gohri
Copy link
Owner

Can you try this beta build: [email protected] ?

@haobinliang
Copy link
Author

Thank you @rohit-gohri ! Sorry that I couldn't give any more info in the first go.

But you worked the magic - [email protected] works!!!

@rohit-gohri
Copy link
Owner

Awesome! Then I'll merge the PR and release it

@rohit-gohri
Copy link
Owner

Released in v1.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builds needs-reproduction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants