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

redocusaurus fails the builds with beta.19 & .20 #175

Closed
Licenser opened this issue May 6, 2022 · 9 comments · Fixed by #176
Closed

redocusaurus fails the builds with beta.19 & .20 #175

Licenser opened this issue May 6, 2022 · 9 comments · Fixed by #176
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file help wanted PRs are encouraged and will be accepted

Comments

@Licenser
Copy link

Licenser commented May 6, 2022

Hi,

it seems that using redocusaurus with beta.19 (or .20) causes the builds to fail on (probably) every page.

The build errors with:

// ... snip ...

ERROR] Docusaurus server-side rendering could not render static page with path "/" (lots of those for different pages)

// ... snip ...

TypeError: content.replace is not a function (lots of those)

// ... snip ...

[ERROR] Error: Failed to compile with errors.
    at /home/heinz/tremor-www/node_modules/@docusaurus/core/lib/webpack/utils.js:182:24
    at /home/heinz/tremor-www/node_modules/webpack/lib/MultiCompiler.js:554:14
    at processQueueWorker (/home/heinz/tremor-www/node_modules/webpack/lib/MultiCompiler.js:491:6)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

Removing (or commenting) out the redocusauris preset solves the build problems:

{
// ... snip ...

  presets: [
    // [
    //   'redocusaurus',
    //   /** @type {import('@docusaurus/preset-classic').Options} */
    //   ({
    //     // Plugin Options for loading OpenAPI files
    //     specs: [
    //       {
    //         spec: 'static/api/v0.12/openapi.yaml',
    //         route: '/api/',
    //       },
    //     ],
    //     // Theme Options for modifying how redoc renders them
    //     theme: {
    //       // Change with your site colors
    //       primaryColor: '#1890ff',
    //     },
    //   }),
    // ],
 
 // ... snip  ...
  ]
}
@Tricked-dev
Copy link

ran into the same issue while trying to build my website

@rohit-gohri rohit-gohri added bug Something isn't working help wanted PRs are encouraged and will be accepted dependencies Pull requests that update a dependency file labels May 8, 2022
lumpi2k added a commit to lumpi2k/docusaurus-cf that referenced this issue May 8, 2022
@aerovulpe
Copy link
Contributor

aerovulpe commented May 12, 2022

I think this is caused by facebook/docusaurus#7398

@Licenser
Copy link
Author

good insight!

@rohit-gohri rohit-gohri self-assigned this May 14, 2022
@rohit-gohri
Copy link
Owner

Hey all! Thanks for reporting the issue. I'm trying to fix this currently

@rohit-gohri
Copy link
Owner

rohit-gohri commented May 14, 2022

I would recommend downgrading to beta.18 till then.

Fix incoming

@rohit-gohri
Copy link
Owner

rohit-gohri commented May 14, 2022

On debugging, the issue seems to be originating in url validation in redoc which throws the error TypeError [ERR_INVALID_URL]: Invalid URL for relative paths now. If chalk was not found for some reason then it would not be able to print the error and report that error. I have pinned the redoc dependency to a specific version for now and using absoluteUrls for the download link.

@rohit-gohri
Copy link
Owner

rohit-gohri commented May 14, 2022

Fixed in v1.0.4

@ArthurFlag
Copy link

Well done, thanks for the quick action @rohit-gohri 🙌

@shortcuts
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file help wanted PRs are encouraged and will be accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants