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

Trying to update to Docusaurus 3.7.0 with React 19 causes issue with Mermaid plugin when using Yarn but not NPM #426

Closed
4 tasks done
thadguidry opened this issue Feb 2, 2025 · 0 comments · Fixed by #427
Assignees
Labels

Comments

@thadguidry
Copy link
Member

thadguidry commented Feb 2, 2025

I've done the necessary research to resolve the issue we would prevent us from upgrading Docusaurus to 3.7.0 and keep using the Mermaid plugin.
facebook/docusaurus#10645

The basic remedy is just to switch over to npm instead of yarn. Simple enough.

I think logically this makes sense for a number of reasons:

  • npm itself has gotten better and has equivalent features now with yarn.
  • nearly every package maintainer ensures things work with npm, but not always 100% with yarn. :-(
  • because of the above, we'll get better error info when making forward changes as packages migrate also to React 19 as needed. Yarn doesn't always give the correct messaging in errors or deprecation warnings (likely because of package maintainers not accounting for the way Yarn handles things).
  • Slober himself doesn't use yarn and their CI e2e workflow for Yarn PnP doesn't cover the Mermaid theme and thus Docusaurus will likely stay more congruent with npm. Adding mermaid plugin breaks the document project when Yarn v4 is used and PnP is enabled. facebook/docusaurus#10645 (comment)

TASKS TO DO FOR THIS ISSUE

  • Remove yarn.lock file
  • Update to Docusaurus 3.7.0 and React 19.0.0 in package.json
  • Update the netlify.toml to use npm instead of yarn commands
  • Update the README.md with instructions for npm install npm start, etc. instead of yarn commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant