After some recent additions and changes, I started to see some errors in my Netlify deploys.
10:38:25 PM: /bin/sh: 1: ffmpeg: not found
10:38:25 PM: at ChildProcess.exithandler (node:child_process:326:12)
10:38:25 PM: at ChildProcess.emit (node:events:369:20)
10:38:25 PM: at maybeClose (node:internal/child_process:1067:16)
10:38:25 PM: at Socket.<anonymous> (node:internal/child_process:453:11)
10:38:25 PM: at Socket.emit (node:events:369:20)
10:38:25 PM: at Pipe.<anonymous> (node:net:666:12)
10:38:25 PM: Problem writing Eleventy templates: (more in DEBUG output)
A quick search showed some
ffmpeg not being available in the Netlify images, and a recommendation to
either include a static binary of ffmpeg or to reference the
I liked the latter idea better - better to not check in a binary, right? - so
I gave it a try. Pretty simple, all told, and it worked out. I'd rather keep
ffmpeg installed via homebrew, so I wanted this just in
the Netlify deploy.
So, my updated Netlify
npm install --save @ffmpeg-installer/ffmpeg
echo "PATH: $PATH"
npm run build
And the supporting
const path = require('path');
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffmpegDir = path.dirname(ffmpegPath);