1、npm安装Webpack报错如下图: 2、此时我们设置淘宝镜像如下: npm config set registry https://registry.npm.taobao.org 3、接下来就可以安装成功啦