Can't use along with electron-react-boilerplate?
dzpt opened this issue · 3 comments
dzpt commented
I've tried to install along with electron-react-boilerplate then got this error
npm install react-desktop --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react@18.2.0
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@"^15.0 || ^16.0" from react-desktop@0.3.9
npm ERR! node_modules/react-desktop
npm ERR! react-desktop@"*" 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.
axoroll7 commented
The package.json
of the two projects don't have the same required react version. Just change it to the same version. It will not be officially supported by one of the two project, but you do not have a choice. I am assuming your are new to nodejs, because this problem appears very often.
oguz-yilmaz commented
@dzpt You can force npm to ignore peer dependency conflicts and install react-desktop anyway npm install react-desktop --save --legacy-peer-deps
. However, be cautious with this approach as it might lead to runtime issues.
lacymorrow commented
You can also use yarn, it doesn't have this issue