Closed rickevry closed 2 years ago
If it'll help somebody
I ended up just copying index.js in craco-esbuild.js
and importing plugin from file
const CracoEsbuildPlugin = require('./craco-esbuild');
instead of npm install craco-esbuild
also installed npm i esbuild-loader
Fixed in the last version
It is currently not possible to install craco-esbuild.
Steps to reproduce:
H:\nvm list
Create new project with npm init
Try to install: H:\test_clean>npm install --save-dev craco-esbuild @craco/craco npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: test_clean@1.0.0 npm ERR! Found: react-scripts@4.0.3 npm ERR! node_modules/react-scripts 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@"" from the root project npm ERR! peer @craco/craco@"^6.0.0" from craco-esbuild@0.5.0 npm ERR! node_modules/craco-esbuild npm ERR! dev craco-esbuild@"" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react-scripts@"^5.0.0" from craco-esbuild@0.5.0 npm ERR! node_modules/craco-esbuild npm ERR! dev craco-esbuild@"*" 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.