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 3.7.0 support #1072

Open
markrzen opened this issue Jan 29, 2025 · 2 comments
Open

Docusaurus 3.7.0 support #1072

markrzen opened this issue Jan 29, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@markrzen
Copy link

markrzen commented Jan 29, 2025

Describe the bug

Generating a new Docusaurus project, then attempting to install docusaurus-openapi-docs results in peerDependencies exceptions.

Expected behavior

According to the README, 3.7.0 is supported.
REL: https://github.com/PaloAltoNetworks/docusaurus-openapi-docs?tab=readme-ov-file#compatibility-matrix

Current behavior

npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"^19.0.0" from the root project
npm error   peer react@"^18.0.0 || ^19.0.0" from @docusaurus/[email protected]
npm error   node_modules/@docusaurus/plugin-content-docs
npm error     peer @docusaurus/plugin-content-docs@"^3.5.0" from [email protected]
npm error     node_modules/docusaurus-plugin-openapi-docs
npm error       docusaurus-plugin-openapi-docs@"*" from the root project
npm error   1 more (react-dom)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.8.4 || ^17.0.0 || ^18.0.0" from [email protected]
npm error node_modules/docusaurus-plugin-openapi-docs
npm error   docusaurus-plugin-openapi-docs@"*" from the root project

Possible solution

Adjust peerDependencies to later versions.

"react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0"

Steps to reproduce

  1. Generate new docusaurus project
  2. npm i -S docusaurus-openapi-docs

Screenshots

Context

Prevents usage without override stop-gap

  "overrides": {
    "react": "^19.0.0",
    "react-dom": "^19.0.0"
  },

Your Environment

Latest Node 20 and packaged NPM

@markrzen markrzen added the bug Something isn't working label Jan 29, 2025
@sserrata
Copy link
Member

Hi @markrzen, good catch, but I was not able to reproduce bootstrapping a new Docusaurus 3.7.0 site from our template. Can you provide the full steps you followed? Thanks!

@sserrata
Copy link
Member

sserrata commented Jan 29, 2025

Ah...it seems to affect only npm (not observed with yarn) due to stricter rules around dependency resolution. You left out the following from the output which allowed me to continue (without the explicit overrides):

npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

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

2 participants