webpack fails to bundle

报错:
The CLI moved into a separate package:webpack-cli
Would you like to install webpack-cli ( That will run npm install -D webpack-cli )
( yes/No )
解决方案:

  • webpack has been updated. After webpack 4.0, the command line has a separate package, webpack-cli, to install the webpack-cli package.

npm install webpack-cli -g


  • Install the specified version, such as installing version 2.4.1

npm install [email protected] -g

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325488550&siteId=291194637