Closed ihollander closed 2 years ago
I was able to work around this by using:
npm i react-codemirror2 --legacy-peer-deps
@elsigh This issue is still the case since the branch was merged, but not released to npm, right? If that's the case, would it be possible to release?
Is this issue fixed?? I received a similar error message while installing react-codemirror-2 for my app.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: online-code-editor@0.1.0
npm ERR! Found: codemirror@6.0.1
npm ERR! node_modules/codemirror
npm ERR! codemirror@"^6.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer codemirror@"5.x" from react-codemirror2-react-17@1.0.0
npm ERR! node_modules/react-codemirror2-react-17
npm ERR! react-codemirror2-react-17@"*" 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.
After writing:
"engines": { "node": "14.x" } in package.json, react-codemirror2 worked correctly
Doesn't work for me ? Any way around guys ?
You might write like this in package.json: {"codemirror": "^5.65.9", "react": "^18.2.0", "react-codemirror2": "^7.2.1", "react-dom": "^18.2.0", "react-router-dom": "^6.3.0", }, "devDependencies": { "react-scripts": "^5.0.1" }, "engines": { "node": "16.x", "npm": "7.x" },
Nope I have react 18. Had to use uiw and install it
PS C:\Users\Muhammad Ali\Desktop\codepen-clone-master\codepen-clone-master> npm install react-icons --save npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: react-codemirror2@7.2.1 npm ERR! Found: react@18.2.0 npm ERR! node_modules/react npm ERR! peer react@"^18.0.0" from @testing-library/react@13.4.0 npm ERR! node_modules/@testing-library/react npm ERR! @testing-library/react@"^13.4.0" from the root project npm ERR! peer react@"^18.2.0" from react-dom@18.2.0 npm ERR! node_modules/react-dom npm ERR! peer react-dom@"^18.0.0" from @testing-library/react@13.4.0 npm ERR! node_modules/@testing-library/react npm ERR! @testing-library/react@"^13.4.0" from the root project npm ERR! react-dom@"^18.2.0" from the root project npm ERR! 3 more (react-scripts, the root project, react-icons) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@">=15.5 <=16.x" from react-codemirror2@7.2.1 npm ERR! node_modules/react-codemirror2 npm ERR! react-codemirror2@"^7.2.1" from the root project npm ERR! See C:\Users\Muhammad Ali\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Muhammad Ali\AppData\Local\npm-cache_logs\2023-01-10T16_09_58_561Z-debug-0.log PS C:\Users\Muhammad Ali\Desktop\codepen-clone-master\codepen-clone-master>
Not working for me. I have tried everything but still not working
npm uninstall codemirror npm i codemirror@5.65.16 npm install react-codemirror2
this work for me
The latest version of Create React App uses React 17: https://github.com/facebook/create-react-app/releases/tag/v4.0.0
When installing
react-codemirror2
after using the latest version of Create React App, I received an error message regarding the React version from the peer dependencies:Steps to reproduce:
I can open a PR to fix.