gatsby: WorkerError: failed to process image
I was using gatsby to well until yesterday. Today I moved whole gatsby site folder to my laptop. On my laptop there’s all dependencies installed and all files posts, images, files etc. were moved successfully. But, if I try to build my site gatsby throws error on processing images. Permissions are right what do I have to check else?
gatsby --version
Gatsby CLI version: 2.8.29
Gatsby version: 2.19.12
Note: this is the Gatsby version for the site at: /home/pol4bear/Blog/Blog
# gatsby clean && gatsby build
success open and validate gatsby-configs - 0.111s
success load plugins - 0.564s
success onPreInit - 0.006s
success initialize cache - 0.018s
success copy gatsby files - 0.029s
success onPreBootstrap - 0.013s
success createSchemaCustomization - 0.084s
success source and transform nodes - 2.696s
success building schema - 0.530s
success createPages - 0.139s
success createPagesStatefully - 0.049s
success onPreExtractQueries - 0.002s
success update schema - 0.042s
success extract queries from components - 0.350s
success write out requires - 0.077s
success write out redirect data - 0.011s
success Build manifest and related icons - 0.164s
success onPostBootstrap - 0.189s
⠀
info bootstrap finished - 6.855 s
⠀
ERROR
Processing /home/pol4bear/Blog/Blog/static/media/2016/07/CIA.png failed
Original error:
WorkerError: Processing /home/pol4bear/Blog/Blog/static/media/2016/07/CIA.png failed
Original error:
- jobs-manager.js:314 exports.enqueueJob
[Blog]/[gatsby]/dist/utils/jobs-manager.js:314:23
- task_queues.js:97 processTicksAndRejections
internal/process/task_queues.js:97:5
not finished run queries - 0.389s
not finished Generating image thumbnails - 0.315s
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 8
- Comments: 16 (3 by maintainers)
I’m glad you reported this, the same happens to me. Works fine on OS X but fails on my Ubuntu server.
Edit: Solved by re-installing the modules
Workaround with latest versions of plugins (without changing image quality)
patch-package
(npm install patch-package
oryarn add patch-package postinstall-postinstall
)"postinstall": "patch-package"
toscripts
inpackage.json
node_modules/imagemin-pngquant/index.js
and changeerror.code
toerror.exitCode
on line 66 (see diff below)npx patch-package imagemin-pngquant
This will save the change that you make to the
index.js
file and apply it any time / anywhere thatnpm install
oryarn
is run in the project.Diff (difference before and after)
This solution worked for me from the thread - https://github.com/gatsbyjs/gatsby/issues/26723
You just saved me after an hour of debugging! THANK YOU! ❤️ 🚀
so guys, I solved my issue by changing all image quality from 100 to 99. took me 1 hour (be carefull with “replace all”). I hope this will help someone!
not working for me (tried cleaning everything) 😦