If you get an error like:
Error: browserType.launch: Failed to launch chromium because executable doesn't exist at ~/.cache/puppeteer/chrome/...
Try one of the following steps:
- Reinstall Puppeteer's test browser:
node node_modules/puppeteer/install.mjs- Or re-run npm install to trigger postinstall hooks:
npm ci- If you're using Playwright, install browsers:
npx playwright install-
If you prefer to use your system Chrome, make sure it's installed and available at
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome(macOS). The plugingatsby-remark-mermaidsupports passingexecutablePathto point to that path. -
If you still have problems, clear Puppeteer's cache and re-run the install:
rm -rf ~/.cache/puppeteer && node node_modules/puppeteer/install.mjsI added a fallback check to gatsby-config.js so it will use system Chrome/Chromium if the Puppeteer binary isn't present.