I'm learning webpack recently, but it's not enough to follow other people's tutorials to change the version, so I make a note if I don't know it. After first setting up the configuration file, I started running it. webpack but
As shown in the figure, you are called to establish a relying relationship with webpack-cli. In fact, I don’t know if there is webpack-cli in the webpack structure. I chose y.
As shown in the figure, it is estimated that there is no webpack-cli. Then now install npm install webpack-cli -D install it globally npm i webpack-cli -g
Then in webpack. There are many solutions on the Internet, I just follow this prompt to complete a simple one.