jaredpalmer / after.js

Next.js-like framework for server-rendered React apps built with React Router
https://npm.im/@jaredpalmer/after
MIT License
4.13k stars 201 forks source link

create-after-app issue with dependencies conflict #543

Open moda20 opened 2 years ago

moda20 commented 2 years ago

🐛 Bug report

Current Behavior

can't install dependencies of example project created by creat-after-app

Error log :

code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: after-examples-basic@0.1.0 npm ERR! Found: webpack@5.24.0 npm ERR! node_modules/webpack npm ERR! dev webpack@"5.24.0" from the root project npm ERR! peer webpack@"~4||~5" from razzle@4.2.17 npm ERR! node_modules/razzle npm ERR! dev razzle@"^4.2.6" from the root project npm ERR! 1 more (html-webpack-plugin) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer webpack@"^4.4.0" from mini-css-extract-plugin@0.9.0 npm ERR! node_modules/mini-css-extract-plugin npm ERR! dev mini-css-extract-plugin@"0.9.0" from the root project npm ERR! peer mini-css-extract-plugin@">=0.9.0 <1.0.0" from razzle@4.2.17 npm ERR! node_modules/razzle npm ERR! dev razzle@"^4.2.6" 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!

Expected behavior

npm install by default

Suggested solution(s)

use Webpack 4 on root project since it is used on razzle latest version

Your environment

Software Version(s)
React 16.02
After.js latest
Razzle 4.2.6
Razzle Plugins
TypeScript
Node 18.4.0
Browser
npm/Yarn npm 8.12.1
Operating System macOs 12 M1 pro