解决办法如下:
1.在命令行先运行npm config set registry http://registry.cnpmjs.org
npm config set registry http://registry.cnpmjs.org
2.然后再运行npm run build
npm run build