Yeoman:找不到'imagemin-jpegtran'

时间:2014-10-09 13:33:55

标签: yeoman imagemin

我一直在搜索此错误的解决方案超过一周但找不到任何内容。由于这个imagemin-jpegtran

,我无法在Yeoman上构建我的dist包

我尝试上传图片以显示错误并让事情变得更轻松但是Stackoverflow因为声誉而不允许我(不知道什么声誉与图片有关......但无论如何......)。< / p>

这是错误:

Running "concurrent:dist" (concurrent) task
Warning: Loading "imagemin.js" tasks... ERROR

Error: Cannot find module 'imagemin-jpegtran'
Warning: Task "imagemin" not found. Use --force to continue

Aborted due to warnings. Use --force to continue
Aborted due to warnings.

1 个答案:

答案 0 :(得分:29)

好的,我找到了解决方案。您必须升级到最新版本的grunt-contrib-imagemin。

为此我做了

npm uninstall --save-dev grunt-contrib-imagemin 

然后

npm install --save-dev grunt-contrib-imagemin