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

Created on 24 Jan 2021  路  2Comments  路  Source: webpack/webpack-dev-server

I saw this issue #2029 and #2967. Both are closed, but the problem exists still.

Operating System: Windows 10
Node Version: v14.15.1
NPM Version: 6.14.8
"webpack": "^5.17.0"
"webpack-cli": "^4.4.0",
"webpack-dev-server": "^3.11.2"
Browser: Google chrome

My script in the package.json file:
"start": "npx webpack-dev-server --mode development --open"

My settings for webpack-dev-server in the webpack.config.js file:

devServer: {
   port: 4200
}

Error message:

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

Most helpful comment

Please use -

webpack serve --mode development

All 2 comments

Please use -

webpack serve --mode development

Please use -

webpack serve --mode development

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tulika21-zz picture tulika21-zz  路  3Comments

uMaxmaxmaximus picture uMaxmaxmaximus  路  3Comments

mrdulin picture mrdulin  路  3Comments

MJ111 picture MJ111  路  3Comments

mischkl picture mischkl  路  3Comments