'webpack-dev-server' is not recognized as an internal or external command,

Recent versions of Webpack & WDS need webpack-cli package, I recommend you to downloaded if your Webpack version is 4 or higher


running

npm install -g webpack-dev-server

in cmd as an administrator solved my problem. I hope it helps others.


Webpack command should be present in location: node_modules\.bin\

In this case in package.json file we are referring to webpack-dev-server, but locally webpack-dev-server doesn't exist.

First run following command for global installation:

npm install -g webpack-dev-server

Second execute local installation command, which will create node_modules\.bin\webpack-dev-server:

npm install webpack-dev-server --save-dev