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

Redoc react component not rendering #10815

Closed
1 task
lamATnginx opened this issue Apr 18, 2024 · 6 comments · Fixed by #10855
Closed
1 task

Redoc react component not rendering #10815

lamATnginx opened this issue Apr 18, 2024 · 6 comments · Fixed by #10855
Labels
- P2: has workaround Bug, but has workaround (priority)

Comments

@lamATnginx
Copy link
Contributor

Astro Info

Astro                    v4.6.3
Node                     v21.2.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/tailwind
                         @astrojs/markdoc
                         @astrojs/react

If this issue only occurs in one browser, which browser is a problem?

Chrome, Safari, Firefox

Describe the Bug

Using redoc react component leads to an error of require is not defined on a local build. Similar issue can be seen in this past MR #6933.

What's the expected result?

Component should render on the page.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-dubfdg?file=README.md&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Apr 18, 2024
@matthewp
Copy link
Contributor

You're using an old version of @astrojs/react where redoc is not configured. Try upgrading to 3.3.0.

@matthewp matthewp added needs response Issue needs response from OP and removed needs triage Issue needs to be triaged labels Apr 22, 2024
@lamATnginx
Copy link
Contributor Author

Thanks for replying. Upgraded to 3.3.0. Cleared node_module and reinstalled. Still receiving same error.

react and react-dom are both 18.2.0 as well.

@matthewp
Copy link
Contributor

Can you update the Stackblitz example as well?

@lamATnginx
Copy link
Contributor Author

lamATnginx commented Apr 22, 2024

Done

@matthewp matthewp added - P2: has workaround Bug, but has workaround (priority) and removed needs response Issue needs response from OP labels Apr 23, 2024
@matthewp
Copy link
Contributor

Looks like noExternal is no longer what you want. It is fixed by removing this line:

. Would appreciate a PR to remove this if you can. Thanks!

@lamATnginx
Copy link
Contributor Author

Thanks for reviewing. Still encountering the same issue when upgraded to astro 4.6.4 with the new changes. Could you verify again on your end @matthewp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: has workaround Bug, but has workaround (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants