npm run build命令运行后报错 npm ERR! missing script: build 打开vue项目中的package.json查看一下script的设置,是否如下图 如果是的话,那么运行打包命令的时候要运行 npm run build:prod --report