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

前端 未结 8 1347
渐次进展
渐次进展 2021-01-04 01:57

\'Github\' asked me to update \'webpack-dev-server\' to version 3.1.11 or higher for security reasons.

However, \'npm run dev\' will not run after the update.

<
8条回答
  •  -上瘾入骨i
    2021-01-04 02:44

    For some reason the webpack team changed the command to webpack serve Change 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"
    

提交回复
热议问题