项目里使用雪碧图插件的时候,打包时发现报错“Module build failed (from ./node_modules/image-webpack-loader/index.js)”,后来又是改版本又是删除node_modules重新npm install都不行;
分析:可能是本地安装的image-webpack-loader是请求国外服务器,导致没有安装全或者安装过程出错误。
最后:
先npm install 安装好node_modules;
然后删除image-webpack-loader;
使用cnpm install image-webpack-loader 可以了