mdx
mdx copied to clipboard
Peer dependency issues with react packages
I'm on react 19. I've been getting peer dependency errors.
Progress: resolved 1543, reused 1359, downloaded 0, added 0, done
WARN Issues with peer dependencies found
apps/docs
└─┬ mintlify 4.2.168
└─┬ @mintlify/cli 4.0.772
└─┬ @mintlify/link-rot 3.0.716
└─┬ @mintlify/common 1.0.577
└─┬ @mintlify/validation 0.1.501
└─┬ @mintlify/mdx 3.0.0
├── ✕ unmet peer react@^18.3.1: found 19.1.1
├── ✕ unmet peer react-dom@^18.3.1: found 19.1.1
└─┬ next-mdx-remote-client 1.1.4
├── ✕ unmet peer react@">= 18.3.0 < 19.0.0": found 19.1.1
└── ✕ unmet peer react-dom@">= 18.3.0 < 19.0.0": found 19.1.1
If you are using npm; add overrides into package.json
{
"overrides": {
"@mintlify/mdx": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next-mdx-remote-client": "^2.0.0"
}
}
}
Thanks @talatkuyuk
I'm using pnpm and I'm already overriding the deps in the project.
Opened an issue so that the team is aware.
I'm using pnpm and I'm already overriding the deps in the project.
I couldn't understand you solved the peerDependency issue or not using overrides, just you mentioned you are overriding. If not resolved, my suggestion works with pnpm as well. I am sure it should resolve the peer dependency issue.
Regarding with mintlify/mdx sets peer dependencies as react@18 or react@19, It is their choice.