报错原因是没有设置全局webpack
解决方案: npm install webpack-cli -g
Error: Cannot find module 'webpack-cli'--解决方案
原文:https://www.cnblogs.com/LUCKY-Y/p/13710561.html