Skip to content
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

Can't use along with electron-react-boilerplate? #166

Open
dzpt opened this issue Aug 3, 2022 · 3 comments
Open

Can't use along with electron-react-boilerplate? #166

dzpt opened this issue Aug 3, 2022 · 3 comments

Comments

@dzpt
Copy link

dzpt commented Aug 3, 2022

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
Copy link

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
Copy link

@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
Copy link

You can also use yarn, it doesn't have this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants