razzle
razzle copied to clipboard
Unable to install with webpack 5 and current npm LTS
🐛 Bug report
Attempting to install dependencies with webpack 5 fails due to erroneous version lock inside razzle config:
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/mini-css-extract-plugin
npm ERR! mini-css-extract-plugin@"^2.4.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer mini-css-extract-plugin@">=0.9.0 <1.0.0" from [email protected]
npm ERR! node_modules/razzle
npm ERR! razzle@"^4.2.6" from the root project
npm ERR!
Current Behavior
Install fails
Expected behavior
Install doesn't fail
Reproducible example
- update packages in package.json to latest version
- npm install
Suggested solution(s)
Make mini-css-extract-plugin an optional dependency or update to webpack 5 compatible version.
Your environment
Software | Version(s) |
---|---|
Razzle | 4.2.6 |
Razzle Plugins | none |
Node | 16.13.0 |
Browser | n/a |
npm/Yarn | npm 8.1.0 |
Operating System | mac |
TypeScript | no |
React | 17.0.2 |
If you use yarn you can force it with resolutions. Not sure we can switch to the new version yet due to esm.
eh yeah or npm install --force
, but that's not ideal so I'm stuck with webpack@4 for now. any idea when you will drop old webpack? It's been more than a year since v5 release.
all depends on when https://github.com/jaredpalmer/razzle/tree/alpha is done