2
E:\MyProjects\MyMLM\Layer1.UI>npm start 

mymlm@1.0.0 start E:\MyProjects\MyMLM\Layer1.UI
webpack-dev-server --no-inline --progress --port 9090
'webpack-dev-server' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! mymlm@1.0.0 start: `webpack-dev-server --no-inline --progress --port 9090`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mymlm@1.0.0 start script 'webpack-dev-server --no-inline --progress --port 9090'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mymlm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server --no-inline --progress --port 9090
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs mymlm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls mymlm
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     E:\MyProjects\MyMLM\Layer1.UI\npm-debug.log

How to solve this? I tried many of answers from stack overflow but I still face same problem.

Note: I have windows-10 home, node-v6.11.3 , npm-3.10.10.

Ishan Thilina Somasiri
  • 1,179
  • 1
  • 12
  • 24
parvat
  • 161
  • 1
  • 2
  • 6
  • Possible duplicate of [webpack is not recognized as a internal or external command,operable program or batch file](https://stackoverflow.com/questions/35810172/webpack-is-not-recognized-as-a-internal-or-external-command-operable-program-or) – Ishan Thilina Somasiri Jan 10 '18 at 04:50
  • Does this answer your question? ['webpack-dev-server' is not recognized as an internal or external command,](https://stackoverflow.com/questions/51849282/webpack-dev-server-is-not-recognized-as-an-internal-or-external-command) – Michael Freidgeim Nov 08 '22 at 05:32

2 Answers2

1

In package.json file define script section like this:

"scripts": {
"start": "node_modules/.bin/webpack --config webpack.js --watch",
...
  },
zakrzu
  • 485
  • 4
  • 9
1

add webpack-dev-server globally

npm i -g webpack-dev-server
hozefam
  • 980
  • 1
  • 7
  • 13