If you are getting "Error: connect ECONNREFUSED 127.0.0.1:21222" error while following hardkoded's solution (top voted solution), do this:
Start chrome on port 21222 with sudo, and connect it like this:
$ sudo <chrome_executable_path> --remote-debugging-port=21222;
Then in puppeteer do this:
const browserURL = 'http://127.0.0.1:21222';
const browser = await puppeteer.connect({browserURL});