pradel / create-react-app-esbuild

Use esbuild in your create-react-app for faster compilation, development and tests
MIT License
563 stars 35 forks source link

CRA5 and @craco 6.4.3 #54

Closed gegorov closed 2 years ago

gegorov commented 2 years ago

How do you guys managed to make it work here https://github.com/pradel/create-react-app-esbuild/pull/48

i'm trying to upgrade to CRA 5.0 with carco 6.4.3. but it says that there are conflicting dependencies as craco 6.4.3 needs CRA4

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: xxxxxx@0.1.0 npm ERR! Found: react-scripts@5.0.0 npm ERR! node_modules/react-scripts npm ERR! 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.

at the same time if i'm trying to use craco 7.0.0-aplha.3 it complains that carao-esbuild 0.5.0 needs craco ^6.

any advice of what i'm doing wrong is much appreciated as i'm a bit stuck with it for couple of days.

DexterHuang commented 2 years ago

for my npm install craco-esbuild gives the same result as you too, anyone know the solution?

tiaanduplessis commented 2 years ago

Craco 6.4.3 does not support CRA v5.0, you would need to use Craco 7.

craco-esbuild does support CRA v5 from 0.5.0, but I believe the related peer dependency in the package.json needs to be updated to support the new Craco version.