ThuyNT13 / thuy_life

my website
https://thuy.life
MIT License
0 stars 0 forks source link

'webpack-dev-server' is not recognized as an internal or external command, operable program or batch file. #14

Closed ThuyNT13 closed 7 years ago

ThuyNT13 commented 7 years ago

not finding webpack-dev-server in Windows.

tried adding following to package.json, which didn't make a difference:

"start": "webpack-dev-server --hot -d --config webpack.dev.config.js --content-base public/ --progress --colors"

but also tried globally installing based on some stackoverflow responses, which also didn't work:

$ npm install -g webpack-dev-server
ThuyNT13 commented 7 years ago

remove from package.json line above:

-d --config webpack.dev.config.js --content-base public/ --progress --colors
Ukmandal commented 6 years ago

$ npm start

angular2-webpack@1.0.0 start C:\Users\Man\project\app webpack-dev-server --hot -d --config webpack.dev.config.js --content-base public/ --progress port 8080

'webpack-dev-server' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! angular2-webpack@1.0.0 start: webpack-dev-server --hot -d --config webpack.dev.config.js --content-base public/ --progress port 8080 npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular2-webpack@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Man\AppData\Roaming\npm-cache_logs\2017-12-08T09_28_12_538Z-debug.log

mendoncanorma commented 6 years ago

If you have installed it locally, then try the below command from your root directory i.e. from the directory where your package.json exists:

node_modules.bin\webpack-dev-server --config=config/webpack.dev.js