在运行vue项目时报:
Module build failed (from ./node_modules/image-webpack-loader/index.js):
Error: Cannot find module 'gifsicle
的错误信息,这是由于webpack-image-loader没有完全拉取下来:
webpack-image-loader依赖的四个图片处理库都需要拉取bin文件
"dependencies": {
"imagemin-gifsicle": "^5.1.0",
"imagemin-mozjpeg": "^6.0.0",
"imagemin-pngquant": "^5.0.0",
"imagemin-svgo": "^5.2.1",
},
需要cnpm install webpack-image-loader
就能将 gifsicle 下载下来
参考博客:https://segmentfault.com/q/1010000011307491
非常感谢这篇博客,解决了我查询很久都没解决的问题
网友评论