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 install craco by npm #457

Closed
mengxianglong123 opened this issue Oct 19, 2022 · 5 comments
Closed

Can't install craco by npm #457

mengxianglong123 opened this issue Oct 19, 2022 · 5 comments

Comments

@mengxianglong123
Copy link

input: npm i @craco/craco
The error message:

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: react-basic@0.1.0
npm ERR! Found: react-scripts@2.1.8
npm ERR! node_modules/react-scripts
npm ERR!   react-scripts@"^2.1.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-scripts@"^4.0.0" from @craco/craco@6.4.5
npm ERR! node_modules/@craco/craco
npm ERR!   dev @craco/craco@"^6.4.5" 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\admin\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\admin\AppData\Local\npm-cache\_logs\2022-10-19T08_42_39_737Z-debug-0.log
@selipasha1337
Copy link

same

@chkrause
Copy link

Same for me

@dilanx
Copy link
Owner

dilanx commented Oct 19, 2022

Which version of CRA (react-scripts) are you using? If you're using CRA 5, the current release of craco does not yet support that and you'll need to install the alpha version (npm i @craco/craco@alpha) until craco 7 is released (hopefully soon).

@selipasha1337
Copy link

selipasha1337 commented Oct 19, 2022

@dilanx, npm i @craco/craco@alpha doesn't work with craco-antd

Screenshot 2022-10-20 023527

@dilanx
Copy link
Owner

dilanx commented Oct 20, 2022

@selipasha1337 it looks like craco-antd doesn't support craco 7 (and therefore does not support react-scripts 5). The developer of craco-antd will need to update it to the newer version. Otherwise, you'd have to downgrade to Create React App 4 and the respective craco version (craco 6).

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