Unsatisfied peer dependencies on fresh project with 3.6.1
#10668
Open
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clear
oryarn 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
- Run
npm init docusaurus@latest
- (use any name)
classic
TypeScript
- (make sure
yarn
is available withcorepack enable
- 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 withyarn 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
- Public source code: https://github.com/MorrisonCole/docusaurus-peer-dependencies-repro/
- Public site URL: N/A
- Docusaurus version used:
3.6.1
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome
130.0.6723.117
, Nodev20.10.0
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS Sequoia 15.1
Self-service
- I'd be willing to fix this bug myself.