Preliminary Checks
Description
I see bug reports that have been converted to discussions saying that running npm install --legacy-peer-deps is the solution for this issue.
If that is, indeed, the official response and solution for these issues, please update the documentation to say that using gatsby-plugin-mdx requires the use of legacy-peer-deps.
Honestly, I'm surprised this isn't considered an actual bug to fix. The default behavior to install apps is running npm install. Using the --legacy-peer-deps option should not be considered the official solution.
Reproduction Link
https://github.com/gatsbyjs/gatsby
Steps to Reproduce
- run
gatsby new
- When prompted for additional functions choose
Add Markdown and MDX support
- Complete the wizard
- Switch to the newly created directory and run
npm install
...
(note: I chose typescript when prompted, not sure if that matters)
Expected Result
npm install runs with no errors.
Actual Result
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: gatsby-plugin-mdx@5.13.1
npm ERR! Found: @mdx-js/react@3.0.1
npm ERR! node_modules/@mdx-js/react
npm ERR! @mdx-js/react@"^3.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @mdx-js/react@"^2.0.0" from gatsby-plugin-mdx@5.13.1
npm ERR! node_modules/gatsby-plugin-mdx
npm ERR! gatsby-plugin-mdx@"^5.13.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @mdx-js/react@2.3.0
npm ERR! node_modules/@mdx-js/react
npm ERR! peer @mdx-js/react@"^2.0.0" from gatsby-plugin-mdx@5.13.1
npm ERR! node_modules/gatsby-plugin-mdx
npm ERR! gatsby-plugin-mdx@"^5.13.1" from the root project
npm ERR!
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.
Environment
System:
OS: Windows 10 10.0.22631
CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13900KF
Binaries:
Node: 18.18.2 - C:\Program Files\nodejs\node.EXE
npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.12.0
Browsers:
Edge: Chromium (123.0.2420.81)
npmPackages:
gatsby: ^5.13.3 => 5.13.3
gatsby-plugin-mdx: ^5.13.1 => 5.13.1
gatsby-source-filesystem: ^5.13.1 => 5.13.1
Config Flags
No response
Preliminary Checks
Description
I see bug reports that have been converted to discussions saying that running
npm install --legacy-peer-depsis the solution for this issue.If that is, indeed, the official response and solution for these issues, please update the documentation to say that using
gatsby-plugin-mdxrequires the use of legacy-peer-deps.Honestly, I'm surprised this isn't considered an actual bug to fix. The default behavior to install apps is running
npm install. Using the --legacy-peer-deps option should not be considered the official solution.Reproduction Link
https://github.com/gatsbyjs/gatsby
Steps to Reproduce
gatsby newAdd Markdown and MDX supportnpm install...
(note: I chose typescript when prompted, not sure if that matters)
Expected Result
npm install runs with no errors.
Actual Result
Environment
System: OS: Windows 10 10.0.22631 CPU: (32) x64 13th Gen Intel(R) Core(TM) i9-13900KF Binaries: Node: 18.18.2 - C:\Program Files\nodejs\node.EXE npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD Languages: Python: 3.12.0 Browsers: Edge: Chromium (123.0.2420.81) npmPackages: gatsby: ^5.13.3 => 5.13.3 gatsby-plugin-mdx: ^5.13.1 => 5.13.1 gatsby-source-filesystem: ^5.13.1 => 5.13.1Config Flags
No response