philhawksworth / eleventyone

A scaffold for a quick start building with the Eleventy SSG
https://eleventyone.netlify.com
MIT License
465 stars 112 forks source link

Test whether gm is installed #1

Open pborenstein opened 6 years ago

pborenstein commented 6 years ago

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.
planetoftheweb commented 5 years ago

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.

stickhandle commented 5 years ago

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