craco-less 2.0.0 requires react-scripts 5 but that's incompatible with craco 6.4.3
See original GitHub issueI can’t seem to find versions of react-scripts
and craco
that are compatible with both craco-less
2.0.0 and each other.
craco
6.4.3 requires react-scripts 4
but then I get this error saying craco-less
needs react-scripts
5:
npm ERR! Found: react-scripts@4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@"4.0.3" from the root project
npm ERR! peer react-scripts@"^4.0.0" from @craco/craco@6.4.0
npm ERR! node_modules/@craco/craco
npm ERR! @craco/craco@"6.4.0" from the root project
npm ERR! peer @craco/craco@"^6.0.0" from craco-less@2.0.0
npm ERR! node_modules/craco-less
npm ERR! craco-less@"2.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-scripts@"^5.0.0" from craco-less@2.0.0
npm ERR! node_modules/craco-less
npm ERR! craco-less@"2.0.0" from the root project
If instead I install the craco
7 alpha and react-scripts
5, craco-less
doesn’t like the craco
version:
npm ERR! Found: @craco/craco@7.0.0-alpha.0
npm ERR! node_modules/@craco/craco
npm ERR! @craco/craco@"^7.0.0-alpha.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @craco/craco@"^6.0.0" from craco-less@2.0.0
npm ERR! node_modules/craco-less
npm ERR! craco-less@"2.0.0" from the root project
What’s the right answer here?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:39
- Comments:7
Top Results From Across the Web
Craco does not work properly with react-scripts@5.0.0
craco 's Github readme, states that it is supporting Create React App (CRA) 4.
Read more >You need to update your react-script package. As craco@6.4 ...
I have looked the error online and I am not yet what I am doing wrong. I would appreciate so much your help....
Read more >craco-less - npm
A Less plugin for craco / react-scripts / create-react-app. Latest version: 2.0.0, last published: a year ago. Start using craco-less in ...
Read more >Craco-antd NPM - npm.io
This is a craco plugin that makes it easy to use the Ant Design UI library with ... react-scripts : ^5.0.0; @craco/craco :...
Read more >could not resolve dependency: npm err! peer react@"
“could not resolve dependency: npm err! peer react@"^16.0.0" from react-acceptjs@0.1.2” Code Answer. Could not resolve dependency: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I switched back to
craco-less 1.20.0
withcraco 6.4.3
andreact-scripts 4.0.3
which worksI’m really sorry guys for the delays. For people wanting to use craco-less with CRA 5 and Craco v7 a new pre-release have been published on NPM. And for some back-story. The changes introduced in craco-less 2.0.0 are meant to make it work with CRA5, hence the major version bump. At the time of the update (just before Christmas) Craco v7 alpha was not published yet and the peer-dependency issues are only relative to npm (I guess it’s related to the fact that yarn and npm are managing dependencies in different ways). As a temporary fix (until craco v7 is released) I suggest we add an entry to the readme with compatibility table between craco-less and cra/craco and recommend to people using npm to install the new alpha version.