遇到这个问题是因为没有安装webpack-dev-server导致的,直接在终端输入两步指令即可解决。 1.npm install webpack-dev-server 2.npm install webpack-cli; 然后再npm run dev就可以了。