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

Issue when combining with imagemin-svgo 5.2.0 #23

Open
bcreeves opened this issue Oct 5, 2016 · 2 comments
Open

Issue when combining with imagemin-svgo 5.2.0 #23

bcreeves opened this issue Oct 5, 2016 · 2 comments

Comments

@bcreeves
Copy link

bcreeves commented Oct 5, 2016

When using laravel-elixir-imagemin 0.2.3 with imagemin-svgo 5.2.0 the below error occurs:

/Users/brian/Sites/ddos/node_modules/is-svg/index.js:8
        var charCode = isBuf ? buf[i] : buf.charCodeAt(i);
                                           ^

TypeError: Cannot read property 'charCodeAt' of undefined
    at isBinary (/Users/brian/Sites/ddos/node_modules/is-svg/index.js:8:38)
    at module.exports (/Users/brian/Sites/ddos/node_modules/is-svg/index.js:19:10)
    at buf (/Users/brian/Sites/ddos/node_modules/imagemin-svgo/index.js:8:7)
    at Imagemin.use (/Users/brian/Sites/ddos/node_modules/imagemin/index.js:63:51)
    at DestroyableTransform.through.obj.percent (/Users/brian/Sites/ddos/node_modules/gulp-imagemin/index.js:47:5)
    at DestroyableTransform._transform (/Users/brian/Sites/ddos/node_modules/through2-concurrent/through2-concurrent.js:30:15)
    at DestroyableTransform.Transform._read (/Users/brian/Sites/ddos/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10)
    at DestroyableTransform.Transform._write (/Users/brian/Sites/ddos/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83)
    at doWrite (/Users/brian/Sites/ddos/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:313:64)
    at writeOrBuffer (/Users/brian/Sites/ddos/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:302:5)

If I downgrade imagemin-svgo to ^4.2.0 everything works.

@mikezange
Copy link

mikezange commented May 3, 2017

Had this while using with gulp-imagemin also, on node v4.0.0, got a feeling it is a imagemin-svgo issue.

Upgrading node to ^6 or downgrading imagemin-svgo to ^4.2.0 seems to solve.

@facundofarias
Copy link

I've solved it by updating laravel-elixir and laravel-elixir-imagemin to the latest version.

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