I am getting this error from the terminal while installing react-mde
npm package:
npm i react-mde
Above command gives error below:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.0" from [email protected]
npm ERR! node_modules/react-mde
npm ERR! react-mde@"*" 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.
npm ERR!
npm ERR! See C:\Users\Peter.Njuguna\AppData\Local\npm-cache\eresolve-report.txt for a full report.
``
try this npm i react-mde --legacy-peer-deps
Check this documentation
react-mde
does not support react 18 yet. To to use react-mde
in react 18 use below command.
npm i react-mde --legacy-peer-deps
To use react-mde
with its properties and its css styling import following:
import ReactMde from "react-mde";
import 'react-mde/lib/styles/css/react-mde-all.css';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With