Resolve: 'webpack-dev-server' is not an internal or external command, operable program or batch file.

I believe many people will certainly encounter some problems (as shown below) when using webpack-dev-server
Here Insert Picture Description
When I was studying since vue framework to be used to webpack tool, but this tool is based on the node, but I do not have node any basis, then every problem you crazy searched and searched on the internet, such as a similar answer to that question a lot, but everyone's situation is different on the internet, and I believe my case is the most complex kind, tried after all the way to the internet is not resolved, finally worked out a set of their own universal solution!

w e b p a c k d e v s e r v e r wrong error law then \ Color {# FF0000} {webpack-dev-server error rule:}

Go to the project root directory delete node_modules folder, then run in the terminal project root directory path of "npm install" wait "npm run dev" After installation, run again, some people are on it right away, but often someone will (For example, I) still reported a similar error, this time you only need once again to repeat the same operation, "once again not deleted before installing"! ! !

Test Results:

Here Insert Picture Description

Published 134 original articles · won praise 32 · views 40000 +

Guess you like

Origin blog.csdn.net/yang_guang3/article/details/104441219