Skip to content

Instantly share code, notes, and snippets.

@raoulwegat
Created October 18, 2023 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raoulwegat/1ca4e813b52d5d63f6900ff38724e615 to your computer and use it in GitHub Desktop.
Save raoulwegat/1ca4e813b52d5d63f6900ff38724e615 to your computer and use it in GitHub Desktop.
override puppeteer default browser.md

override puppeteer default browser

When using criticalCSS on Apple Silicon hardware in an arm64 linux virtual machine, puppeteer installs an x86-64 version of chromium which will not launch and will cause and npm run command to fail.

This problem can be solved by firstly installing chromium-browser which is a native arm64 and x86-64 build:

sudo apt install chromium-browser

And then setting an environment variable in your .profile

export PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment