eleventyone icon indicating copy to clipboard operation
eleventyone copied to clipboard

Test whether gm is installed

Open pborenstein opened this issue 7 years ago • 2 comments

If you're running locally, and gm isn't installed, yarn run build fails. Not a problem on Netlify, of course.

$ yarn run build
yarn run v1.7.0
$ gulp build && yarn run build:functions
[19:02:49] Using gulpfile ~/work/eleventyone/gulpfile.js
[19:02:49] Starting 'build'...
[19:02:49] Starting 'generate'...
Writing dist/about/index.html from ./src/site/about.md.
Writing dist/index.html from ./src/site/index.md.
Writing dist/search.json from ./src/site/search.njk.
Writing dist/posts/a-post/index.html from ./src/site/posts/a-post.md.
Writing dist/posts/another-post/index.html from ./src/site/posts/another-post.md.
Processed 5 files in 0.21 seconds
[19:02:50] Finished 'generate' after 1.03 s
[19:02:50] Starting 'assets'...
[19:02:50] Starting 'images'...
[19:02:50] Starting 'styles'...
[19:02:50] Starting 'scripts'...
[19:02:50] Starting 'resize_400'...
[19:02:50] Starting 'resize_1000'...
[19:02:50] Starting 'copyOriginalImages'...
[19:02:50] Finished 'scripts' after 16 ms
[19:02:50] Finished 'resize_400' after 25 ms
[19:02:50] Finished 'resize_1000' after 27 ms
[19:02:50] Finished 'copyOriginalImages' after 30 ms
[19:02:50] Finished 'images' after 31 ms
[19:02:50] The following tasks did not complete: build, assets, styles
[19:02:50] Did you forget to signal async completion?

events.js:183
      throw er; // Unhandled 'error' event
      ^
Error: Error: Could not execute GraphicsMagick/ImageMagick: gm "identify" "-ping" "-format" "%wx%h" "-" this most likely means the gm/convert binaries can't be found
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

pborenstein avatar Jul 07 '18 23:07 pborenstein

Yes...this happens for me as well. I can temporarily fix it by removing the 'images' task from the gulp task in gulpfile.js, but I'm not sure if that's optimal.

gulp.task('assets', gulp.parallel(
 // 'images',
  'styles',
  'scripts'
));

This is fixed if you run

brew install graphicsmagick

But this should be in the instructions.

planetoftheweb avatar Dec 25 '18 23:12 planetoftheweb

This should get the windows build working (assuming you are using choco as you package mgr: choco install graphicsmagick

stickhandle avatar Jan 01 '19 16:01 stickhandle