How to specify Chrome executable path when starting Puppeteer

I’m trying to get Puppeteer working but running into issues when it tries to start Chrome. The problem seems to be that it can’t find the Chrome browser on my system. I’ve been struggling with this for a while now and I’m not sure what I’m doing wrong.

I think I need to tell Puppeteer exactly where my Chrome installation is located, but I’m not familiar with the proper way to set the executable path. Has anyone dealt with this before? What’s the right method to point Puppeteer to the chrome.exe file?

I’m working on Windows and Chrome is installed in the usual location, but Puppeteer doesn’t seem to detect it automatically. Any guidance would be really helpful since I’m stuck on this basic setup step.

i had this issue too, just specify the path like browser = await puppeteer.launch({executablePath: 'C:\Path\To\chrome.exe'});. U might need to check both Program Files and Program Files (x86) for the right one on Windows.

I’ve found success using commands like where on Windows to dynamically locate Chrome. Another alternative is to examine the registry entries if you’re having trouble with fixed paths. That said, the simplest solution I encountered was to install Chrome in its default directory and ensure Puppeteer is installed via npm install puppeteer instead of puppeteer-core. This way, you get Chromium bundled with Puppeteer, eliminating path issues altogether. If using your current Chrome installation is necessary, then utilize the executablePath option as others suggested, and ensure your backslashes in the path are properly escaped.

If Puppeteer is unable to find your Chrome installation, you need to provide the path explicitly. In your Puppeteer launch options, include the executablePath as follows: executablePath: 'C:\Program Files\Google\Chrome\Application\chrome.exe'. This path can vary if you have a 32-bit version of Chrome, in which case you would use C:\Program Files (x86)\Google\Chrome\Application\chrome.exe. Alternatively, you can set the PUPPETEER_EXECUTABLE_PATH environment variable, which allows Puppeteer to locate Chrome without hardcoding the path in your scripts. Remember to use double backslashes or forward slashes to prevent issues with escape sequences.