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

前端 未结 8 1423
渐次进展
渐次进展 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条回答
  •  滥情空心
    2021-01-04 02:55

    To fix it just do 2 things.

    1. Install npm i webpack-cli @webpack-cli/init
    2. Add this to your package.json:
      "scripts": {
        "start": "webpack-cli serve --mode development"
      },
      

    Done!

提交回复
热议问题