-
Notifications
You must be signed in to change notification settings - Fork 174
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
Fatal error: Cannot read property 'length' of null #320
Comments
Does this still happen with 1.0.0? |
I get the same error on 1.0.0. |
Ah no, not same, it's |
same here :( |
btw, it seems to be working on my Debian 7 environment, but 8 fails, weird, any hints? |
It's probably a different situation, but I figured I'd add this here in case anyone else comes across it. I had this error and through adding console.log()s to print the filename in the imagemin task (node_modules/grunt-contrib-imagemin/tasks/imagemin.js), I found that the error was produced when the task was given a directory rather than a file (ie app/images). This was due to lines in my Gruntfile :
When I changes them to (note the extra
all worked as before. |
I was still encountering this error despite changing the path as above. Discovered that Before After |
Sometimes data[0].contents is returned as null. This adds a null check to avoid a runtime exception
Fixed in 92963f1. |
I'm getting
Fatal error: Cannot read property 'length' of null
on images that I've optimized with TinyPNG (but aren't corrupt). Here's an example image:ImageMagick's
identify
outputsmyImage.png PNG 29x29 29x29+0+0 8-bit sRGB 28c 409B 0.000u 0:00.000
so the image appears to be valid, butimagemin
has trouble with it.I'm using
grunt-contrib-imagemin v0.9.4
.Thanks!
The text was updated successfully, but these errors were encountered: