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

Unsatisfied peer dependencies on fresh project with 3.6.1 #10668

Open
7 tasks done
MorrisonCole opened this issue Nov 11, 2024 · 1 comment · May be fixed by #10670
Open
7 tasks done

Unsatisfied peer dependencies on fresh project with 3.6.1 #10668

MorrisonCole opened this issue Nov 11, 2024 · 1 comment · May be fixed by #10670
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers

Comments

@MorrisonCole
Copy link

MorrisonCole commented Nov 11, 2024

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

A fair few core packages have unsatisfied peer dependencies with a fresh project on 3.6.1. This is most obvious with something like yarn 3.5.0, but also reproducable with pnpm and auto-install-peers=false.

Full set of warnings below.

Reproducible demo

https://github.com/MorrisonCole/docusaurus-peer-dependencies-repro/

Steps to reproduce

  1. Run npm init docusaurus@latest
    • (use any name)
    • classic
    • TypeScript
  2. (make sure yarn is available with corepack enable
  3. Run yarn from the new project. Depending on the version, different warnings will be printed at this time, but you can see all peer warnings with yarn explain peer-requirements.

Expected behavior

No YN0002 warnings / missing peers.

Actual behavior

Fair few missing peers, e.g., with (yarn set version 3.5.0):

➤ YN0002: │ @docusaurus/bundler@npm:3.6.1 [fb9bc] doesn't provide react (p61e2d), requested by @docusaurus/types
➤ YN0002: │ @docusaurus/bundler@npm:3.6.1 [fb9bc] doesn't provide react-dom (p19f9f), requested by @docusaurus/types
➤ YN0002: │ @docusaurus/plugin-content-blog@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p7dbc9), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/plugin-content-docs@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p9f38b), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/plugin-content-pages@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p77e7e), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/plugin-debug@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p6f0af), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/plugin-google-analytics@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p9f6c6), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/plugin-google-gtag@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p7a09c), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/plugin-google-tag-manager@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p0011e), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/plugin-sitemap@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p93365), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/preset-classic@npm:3.6.1 [e1d64] doesn't provide @mdx-js/react (p45d1a), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/theme-search-algolia@npm:3.6.1 [38fed] doesn't provide @mdx-js/react (p4a912), requested by @docusaurus/core
➤ YN0002: │ @docusaurus/utils-common@npm:3.6.1 doesn't provide react (pc078f), requested by @docusaurus/types
➤ YN0002: │ @docusaurus/utils-common@npm:3.6.1 doesn't provide react-dom (p5bd66), requested by @docusaurus/types
➤ YN0002: │ @docusaurus/utils@npm:3.6.1 doesn't provide react (p8d75d), requested by @docusaurus/types
➤ YN0002: │ @docusaurus/utils@npm:3.6.1 doesn't provide react-dom (pb357f), requested by @docusaurus/types

Your environment

Self-service

  • I'd be willing to fix this bug myself.
@MorrisonCole MorrisonCole added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Nov 11, 2024
@MorrisonCole MorrisonCole linked a pull request Nov 12, 2024 that will close this issue
3 tasks
@Josh-Cena
Copy link
Collaborator

#10391 added a peer dependency of core on MDX, so all dependents of core must also peerly depend on MDX. I don't fancy this idea especially since the core should be content-agnostic. @slorber is it possible for the core to expose a plugin API that injects module aliases for bundlers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants