grumpyoldman-io / react-boilerplate

A React boilerplate using CRA5 + Craco, Typescript, Tailwind, Eslint + Prettier, Jest and Husky
20 stars 6 forks source link

Craco@6.4.3 does not support react-scripts@5.0.0 #3

Open espenja opened 2 years ago

espenja commented 2 years ago

Was looking for a solution to a problem I am facing and came across this repo. Unfortunately, this repo suffers the same problem. npm install fails because Craco@6.4.3 does not support react-scripts@5.0.0 (https://github.com/gsoft-inc/craco/issues/378 and https://github.com/gsoft-inc/craco/issues/415)

Reproduce by cloning the repo and running npm i

Output:

~/source/other/react-boilerplate > main
❯ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: blank-web-application@0.1.0
npm ERR! Found: react-scripts@5.0.0
npm ERR! node_modules/react-scripts
npm ERR!   dev react-scripts@"5.0.0" 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.3
npm ERR! node_modules/@craco/craco
npm ERR!   dev @craco/craco@"6.4.3" 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 /home/username/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/username/.npm/_logs/2022-05-02T22_47_53_335Z-debug-0.log
yudatadei commented 2 years ago

v7.0.0-alpha.3 works just fine with react-scripts@5.0.0

https://github.com/gsoft-inc/craco/releases/tag/v7.0.0-alpha.3