V
V
Vika Marmeladka2020-11-20 18:00:37
gulp.js
Vika Marmeladka, 2020-11-20 18:00:37

Why won't gulp run due to a bug with the imagemin jpegtran plugin?

When starting a project (not written by me) gulp. Throws an error with the imagemin jpegtran plugin. I can’t understand why, maybe it’s due to the fact that the path is laid through the user Sergey, which is written in Cyrillic. If so, how to change the name of the folder itself (because I changed the username, but the folder is still the same Sergey)

$ gulp
[17:47:20] Using gulpfile ~\Desktop\avd-site\gulpfile.js
[17:47:20] Starting 'default'...
[17:47:20] Starting 'build'...
[17:47:20] Starting 'webserver'...
[17:47:20] Starting 'watch'...
[17:47:20] Starting 'clean'...
[17:47:20] Finished 'clean' after 125 ms
[17:47:20] Starting 'html:build'...
[Frontend_Devil] Access URLs:
 -----------------------------------
       Local: http://localhost:9000
    External: http://10.0.0.194:9000
 -----------------------------------
          UI: http://localhost:3002
 UI External: http://localhost:3002
 -----------------------------------
[Frontend_Devil] Serving files from: ./build
[Frontend_Devil] 8 files changed (contacts.html, index.html, postmessage-contacts_en.html, postmessage-subscribe_en.html, postmessage.html, response-form-contacts_en.json, response-form-subscribe_en.json, response-form.json)
[17:47:20] Finished 'html:build' after 576 ms
[17:47:21] Starting 'js:build'...
[Frontend_Devil] Reloading Browsers... (buffered 8 events)
[Frontend_Devil] 1 file changed (main.js)
[17:47:22] Finished 'js:build' after 1.17 s
[17:47:22] Starting 'style:build'...
Browserslist: caniuse-lite is outdated. Please run:
npx [email protected] --update-db
[Frontend_Devil] Reloading Browsers...
[Frontend_Devil] 3 files changed (libs-css.min.css, main.min.css, var.min.css)
[17:47:23] Finished 'style:build' after 1.37 s
[17:47:23] Starting 'root:build'...
[17:47:23] Finished 'root:build' after 8.26 ms
[17:47:23] Starting 'fonts:build'...
[17:47:23] Finished 'fonts:build' after 30 ms
[17:47:23] Starting 'image:build'...
[17:47:23] 'image:build' errored after 67 ms
[17:47:23] TypeError: imagemin.jpegtran is not a function
    at C:\Users\Сергей\Desktop\avd-site\gulpfile.js:139:16
    at image:build (C:\Users\Сергей\Desktop\avd-site\node_modules\undertaker\lib\set-task.js:13:15)
    at bound (domain.js:430:14)
    at runBound (domain.js:443:12)
    at asyncRunner (C:\Users\Сергей\Desktop\avd-site\node_modules\async-done\index.js:55:18)
    at processTicksAndRejections (internal/process/task_queues.js:75:11)
[17:47:23] 'build' errored after 3.48 s
[17:47:23] 'default' errored after 3.52 s

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vika Marmeladka, 2020-11-20
@homsi959

Problem solved. I replaced jpegtran with mozjpeg.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question