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

Error with Docusaurus 2.4.0 #547

Closed
crazyfx1 opened this issue Apr 18, 2023 · 5 comments
Closed

Error with Docusaurus 2.4.0 #547

crazyfx1 opened this issue Apr 18, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@crazyfx1
Copy link

crazyfx1 commented Apr 18, 2023

Describe the bug

Error could not find react-redux context value; please ensure the component is wrapped in a <Provider> with Docusaurus 2.4.0

Expected behavior

Docs should render without error.

Current behavior

When running the docs app, the generated doc pages show an error message:

could not find react-redux context value; please ensure the component is wrapped in a <Provider>
    at useReduxContext (webpack-internal:///./node_modules/react-redux/es/hooks/useReduxContext.js:30:11)
    at useSelector (webpack-internal:///./node_modules/react-redux/es/hooks/useSelector.js:135:28)
    at MethodEndpoint (webpack-internal:///./node_modules/docusaurus-theme-openapi-docs/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js:13:492)
    at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:14986:18)
    at mountIndeterminateComponent (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:17812:13)
    at beginWork (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:19050:16)
    at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:3946:14)
    at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:3995:16)
    at invokeGuardedCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4057:31)
    at beginWork$1 (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:23960:7)

Possible solution

Steps to reproduce

  1. Install Docusaurus 2.4.0
  2. Install 2.0.0-beta.2
  3. Generate petstore.yaml sample
  4. Start app and navigate to a generated doc file.

Screenshots

Context

Your Environment

npm list:

  • Version used: 2.0.0-beta.2
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
  • Operating System and version (desktop or mobile):
  • Link to your project:
@crazyfx1 crazyfx1 added the bug Something isn't working label Apr 18, 2023
@welcome-to-palo-alto-networks

🎉 Thanks for opening your first issue here! Welcome to the community!

@crazyfx1 crazyfx1 changed the title Error using with Docusaurus 2.4.0 Error with Docusaurus 2.4.0 Apr 18, 2023
@crazyfx1
Copy link
Author

I overlooked to set

          docLayoutComponent: "@theme/DocPage",
          docItemComponent: "@theme/ApiItem" // Derived from docusaurus-theme-openapi-docs

@AhmedCoolProjects
Copy link

Didn't work for me actually even I have the same versions
image

@AhmedCoolProjects
Copy link

image

@liudonghua123
Copy link

I am using docusaursu v3. and docLayoutComponent could not use or I will got the following error in the console.

image

And when I only add docItemComponent: "@theme/ApiItem", another errors shown on the page.

image

If I change the docLayoutComponent to docRootComponent . Another errors shown.

image

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

No branches or pull requests

3 participants