puppeteer で自動実行してたら、ずっとエラーになるのでおかしいなと思って調べた。
自分の環境では動くけどサーバーで自動実行したら動かない。
throw new Error(`Could not find Chromium (rev. ${this.puppeteer.browserRevision}). This can occur if either\n` + ^ Error: Could not find Chromium (rev. 1083080). This can occur if either 1. you did not perform an installation before running the script (e.g. `npm install`) or 2. your cache path is incorrectly configured (which is: /root/.cache/puppeteer).
理由は、キャッシュフォルダだった。
/root/.cache/puppeteer
キャッシュフォルダは、uid から拾わずに、env から拾っている。そういえば、sudo して実行してたわ。
対応策
export HOME=/home/takuya sudo -u takuya node bin/my-puppeteer.js