DEV Community

Discussion on: React CMS: The missing link

Collapse
 
antonfrattaroli profile image
Anton Frattaroli

npx create-reactbricks-app breaks on install w/npm 7 b/c legacy peer deps:

Error: Command failed with exit code 1: npm install
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE unable to resolve dependency tree
    npm ERR!
    npm ERR! Found: react@17.0.2
    npm ERR! node_modules/react
    npm ERR!   react@"^17.0.2" from the root project
    npm ERR!   peer react@"^16.6.0 || ^17" from next@10.2.3
    npm ERR!   node_modules/next
    npm ERR!     next@"^10.2.3" from the root project
    npm ERR!   6 more (react-dom, react-bricks, @next/react-dev-overlay, ...)
    npm ERR!
    npm ERR! Could not resolve dependency:
    npm ERR! peer react@"^16.8.0" from cogo-toast@4.2.3
    npm ERR! node_modules/react-bricks/node_modules/cogo-toast
    npm ERR!   cogo-toast@"^4.2.3" from react-bricks@2.3.11
    npm ERR!   node_modules/react-bricks
    npm ERR!     react-bricks@"^2.3.8" from the root project
Enter fullscreen mode Exit fullscreen mode
Collapse
 
matfrana profile image
Matteo Frana

Thank you! I just tried and cannot reproduce the error. Really it found yarn on my system so it used yarn to install packages. We'll investigate it now.

Collapse
 
matfrana profile image
Matteo Frana

Ok, we could not reproduce it with npm 7 too, but I see what the problem is with that library specifying react ^16.8 as a peer dependency (which should require --force on npm install). I'll publish a new version soon to fix this.

Thread Thread
 
matfrana profile image
Matteo Frana

Ok, released v2.3.12 that should solve the problem you encountered! 🎉