I am working on a React webapp using webpack, loosely alongside this tutorial.
Accidentally, I added the node_modules folder to my git. I then removed it again using
npm install webpack-dev-server -g -- windows OS
Better you use sudo in linux to avoid permission errors
sudo npm install webpack-dev-server -g
You could use sudo npm install webpack-dev-server --save to add it to package.json.
Sometimes you may require to run the below commands.
npm install webpack-cli --save or npm install webpack-cli -g