-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
pnpm install fails due to @mdx-js/runtime requiring React 16 #5803
Comments
It looks like there was a recent attempt in the |
MDX right now is using an experimental release (v18) of React while Renovate is trying to downgrade it to v17. Moreover, |
I'm quite happy with pnpm (it has a lot of advantages over npm or yarn), so I think I'll wait until docusaurus upgrades to MDX v2. |
@ltribolet Yes, that means it's not entirely pnpm's fault, but more generally, about |
Thanks for the explanation, as I'm not very familiar with react projects (and node package manager in general). |
Related to #5664, we should probably remove the mdx-runtime usage anyway and find another solution for RSS feed content (like reading generated html files, as suggested by Titus) |
I don't know if it'll help, but in my pnpmfile.js I made react a dependency (not peer dependency) and that seemed to get me through a Docusaurus upgrade: module.exports = {
hooks: {
readPackage,
},
};
function readPackage(pkg, context) {
if (pkg.name === "@mdx-js/runtime" && pkg.version === "1.6.22") {
pkg.dependencies = {
...pkg.dependencies,
react: "16.13.1",
};
}
return pkg;
} Edit: welp, that caused my other projects in the monorepo not to build. Dependencies are hard. |
@taylorreece The pnpm developer does his documentation on Docusaurus 2.0. So I copied his setup of |
Closing because we are no longer using the MDX runtime after #6454 |
🐛 Bug Report
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Docusaurus can't be installed alongside React 17.
Steps to reproduce
Try to install this with pnpm:
Expected behavior
Packages should install.
Actual behavior
It seems some deep dependency of Docusaurus has a strict React 16 requirement:
Your environment
The text was updated successfully, but these errors were encountered: