Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imagemin runs into problems #123

Closed
delight opened this issue Mar 10, 2014 · 4 comments
Closed

imagemin runs into problems #123

delight opened this issue Mar 10, 2014 · 4 comments

Comments

@delight
Copy link
Contributor

delight commented Mar 10, 2014

Building the generated project has problems at the task imagemin. Somehow it deflates the app/images/yeoman.png to 0 Bytes.

Steps to reproduce:

  1. generate a project with yeoman and generator-angular-fullstack 1.3.2
  2. grunt serve:dist
  3. stop the server (optional grunt clean if you like)
  4. grunt serve:dist

On OSX (10.9.2) the builld "works" but the images is deflated to 0 Bytes.
On Linux (2 boxes with debian) I get a warning:

        Warning: Running "imagemin:dist" (imagemin) task
    Warning: ENOENT, no such file or directory 'dist/public/images/yeoman.png' Use --force to continue.

If I use --force it results in the same behavior as OSX: 0 Byte picture.

I used all default generator options with the exception of
[?] Would you like to use Sass (with Compass)? No

But as far as I can tell there is no difference. I didn't test it with sass so thoroughly.
Funny part is that after cleaning all components and caches on my system and starting fresh it seems to work on the fist run of grunt serve:dist - That is why I have it twice in the reproducing steps.

At last I tried the generator-angular (0.7.1) which does not run into the same problem.

Anybody else having this problems ?

Versions used:

generator-angular-fullstack (1.3.2)

yo --version && bower --version && grunt --version && node --version && npm --version 1.1.2
1.2.8
grunt-cli v0.1.13
grunt v0.4.3
v0.10.26
1.4.4

@snowman-repos
Copy link

This could be related to an issue with grunt-imagemin that I posted last month: gruntjs/grunt-contrib-imagemin#140

Try putting cache:false in the grunt-imagemin options.

@delight
Copy link
Contributor Author

delight commented Mar 10, 2014

@darryl-snow cache:false did the trick ! +1

It appears the "simple" generator-angular is using "grunt-contrib-imagemin": "~0.3.0", while the scaffolded projects of generator-angular-fullstack are depending on "grunt-contrib-imagemin": "~0.5.0", which seem to have some problem.

@delight
Copy link
Contributor Author

delight commented Mar 10, 2014

The new version grunt-contrib-imagemin was introduced with the latest version of generator-angular-fullstack. I'll provide a little pull request with the cache:false workaround that can solve as a transitionally fix until the problems in grunt-contrib-imagemin are sorted out.

An alternative would be to revert to an older version of grunt-contrib-imagemin.

@DaftMonk
Copy link
Member

Thanks for the PR, just merged it in. Hopefully imagemin can get the issue sorted out soon so we can take out the workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants