glook / webpack-typescript-react

Webpack 5 boilerplate with support of most common loaders and modules (see tags and description)
MIT License
217 stars 54 forks source link

Checkout 1.0.5 npm i results in dependency error. #11

Closed jafin closed 3 years ago

jafin commented 3 years ago

Checkout repo, run npm i Error below:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: webpack-typescript-react@1.0.5
npm ERR! Found: webpack@5.24.2
npm ERR! node_modules/webpack
npm ERR!   dev webpack@"~5.24.2" from the root project
npm ERR!   peer webpack@">=4.43.0 <6.0.0" from @pmmmwh/react-refresh-webpack-plugin@0.4.3
npm ERR!   node_modules/@pmmmwh/react-refresh-webpack-plugin
npm ERR!     dev @pmmmwh/react-refresh-webpack-plugin@"~0.4.2" from the root project
npm ERR!   1 more (webpack-dev-server)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.20.2" from webpack-plugin-serve@1.3.0
npm ERR! node_modules/webpack-plugin-serve
npm ERR!   peerOptional webpack-plugin-serve@"0.x || 1.x" from @pmmmwh/react-refresh-webpack-plugin@0.4.3
npm ERR!   node_modules/@pmmmwh/react-refresh-webpack-plugin
npm ERR!     dev @pmmmwh/react-refresh-webpack-plugin@"~0.4.2" 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.

Possibly due to npm 7 (running 7.5.4 here ) https://github.com/shellscape/webpack-plugin-serve/issues/195

EDIT: Running this passes install.

npm i --legacy-peer-deps
jafin commented 3 years ago

Oh my closed eyes, I see you raised the PR for the exact issue.