throughwww.cnblogs.com/fengchaoran…(Feng Yangyang’s blog learned the solution to this problem), thanks for sharing, infringement can be deleted, write this article is mainly to record their own pit, but also hope to help friends who meet relevant problems, wish you well.

Problem: ‘webpack’ is not an internal or external command, nor is it a runnable program or batch file.

The node NPM has been configured and the relevant version number can be checked. There is no error in installing Webpack, but there are many warnings. Then I thought I could install webpack successfully, but when I checked the version number of Webpack-v, there was a problem: ‘webpack’ is not an internal or external command, nor a runnable program or batch file.

Solution: (Environment variable configuration) :

My Computer – Right-click Properties – Advanced System Settings – Advanced – Environment Variables:

Create ① User variable: PATH ② System variable: NODE_PATH

User variables:

System variables:

This is the most important point, our problem: ‘webpack’ is not an internal or external command after installing webpack, or it is set incorrectly.

Set PATH and NODE_PATH to C: Program Files\nodejs\node_global. (According to your own path to find the relevant folder to configure, here is the default path configuration)

NODE_PATH = C: Program Files\nodejs\node_global\node_modules = C: Program Files\nodejs\node_global\node_modules

This is how I resolved my error: ‘Webpack’ is not an internal or external command solution.