\'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.
<webpack core team says that form version 3+ the compatibility will foucs on webpack 4
so I think you need also to update webpack 3 to webpack 4
this doc may help you to achieve that https://webpack.js.org/migrate/4
Delete package-lock.json file. Change following in package.json.
"webpack": "^4.32.2",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.11.0"
Run npm install
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 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"
This process work for me
1 - Run your Command Invite/Terminal as Administrator
2 - Install the Vue CLI globally with the command :
npm install -g vue-cli
3 - Create your vue project
vue init webpack your_project_name_here
4 - Goto your project directory you
cd your_project_name_here
5 - If you have vulnerabilities execute :
npm audit fix
Now you can start the web server in development mode by using npm in the following way:
npm run dev
By default it will start the server on port 8080
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