Skip to content

Commit

Permalink
fix: chrome exec path
Browse files Browse the repository at this point in the history
  • Loading branch information
Disane87 committed Oct 29, 2024
1 parent cd7592e commit a2f1788
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/classes/puppeteer.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Puppeteer {
args: this.arguments,
dumpio: false,
devtools: this.debug,
executablePath: this.getExecutablePath(),
// executablePath: this.getExecutablePath(),
});
return this.browser;
}
Expand Down Expand Up @@ -53,14 +53,14 @@ export class Puppeteer {
process.env[`LocalAppData`] + `/Google/Chrome/Application/chrome.exe`,
process.env[`ProgramFiles`] + `/Google/Chrome/Application/chrome.exe`,
process.env[`ProgramFiles(x86)`] +
`/Google/Chrome/Application/chrome.exe`,
`/Google/Chrome/Application/chrome.exe`,
process.env[`LocalAppData`] + `/Chromium/Application/chrome.exe`,
process.env[`ProgramFiles`] + `/Chromium/Application/chrome.exe`,
process.env[`ProgramFiles(x86)`] + `/Chromium/Application/chrome.exe`,
process.env[`ProgramFiles(x86)`] +
`/Microsoft/Edge/Application/msedge.exe`,
`/Microsoft/Edge/Application/msedge.exe`,
process.env[`ProgramFiles`] +
`/Microsoft/Edge/Application/msedge.exe`,
`/Microsoft/Edge/Application/msedge.exe`,
];
break;
default:
Expand All @@ -70,6 +70,7 @@ export class Puppeteer {
`/usr/bin/chromium`,
`/usr/bin/chromium-browser`,
`/snap/bin/chromium`,
`/home/node/.cache/puppeteer/chrome`
];
}

Expand Down

0 comments on commit a2f1788

Please sign in to comment.