DEV Community

Discussion on: Don't use create-react-app: How you can set up your own reactjs boilerplate.

Collapse
 
rohimchou profile image
RohimChou • Edited

Trying to follow through this post, however I encountered Error: Cannot find module 'webpack-cli/bin/config-yargs' error while running the npm start.

Changing from
"start": "webpack-dev-server --mode=development --open --hot"
To
"start": "webpack serve --mode=development --open --hot"
resolved the issue.

Seems like the interface in not compatible with webpack5 now. webpack-dev-server

Collapse
 
nikhilkumaran profile image
Nikhil Kumaran S

Thanks. Will update it.

Collapse
 
talkohavy profile image
talkohavy

Yeah, i've also encountered that issue (and solved it the same way).
Which btw? Is exactly the argument some people made in the comments above in regards for high maintainance, and error prone code when NOT using CRA, and going for pure Webpack solution.

Collapse
 
nikhilkumaran profile image
Nikhil Kumaran S • Edited

Yeah, but migration to newer versions won't be that difficult if you have the habit of checking for any potential refactoring in your project regularly.