Error: Cannot find module 'webpack-cli/bin/config-yargs' Error: Cannot find module 'webpack-cli/bin/config-yargs' vue.js vue.js

Error: Cannot find module 'webpack-cli/bin/config-yargs'


You could try changing webpack-dev-server to webpack serve in your npm run script inside package.json


For some reason the webpack team changed the command to webpack serveChange your package.json:

"start": "webpack serve"

Ref: https://github.com/webpack/webpack-dev-server/issues/2759

The version I am using:

"webpack": "^5.10.0","webpack-cli": "^4.2.0","webpack-dev-server": "^3.11.0"


I agree that you have to upgrade from webpack 3 to 4, but specifically these are the steps I had to do, first, because webpack-cli has been split out into a separate package:

$ npm install webpack webpack-cli --save-dev

As explained here: https://webpack.js.org/guides/getting-started/#basic-setup