Puppeteer: Non of the common Windows Env variables were set
Windows browser/profile lookup has none of the expected environment directory values.
Windows browser/profile lookup has none of the expected environment directory values.
Error message
Non of the common Windows Env variables were set
How this error happens
Windows system-Chrome discovery uses standard environment directory locations. A stripped-down service environment with none of those locations cannot build its search paths.
The snippets use the imported puppeteer instance in the Windows or WSL environment described above.
await puppeteer.launch({
channel: "chrome",
});
How to fix
Use the browser installed for the actual runtime environment instead of asking for cross-environment system Chrome discovery.
const browser = await puppeteer.launch({
browser: "chrome",
});
Things to keep in mind
Install the package-managed browser in the same environment first. If using a Windows system browser is intentional, restore the real Windows service environment or supported WSL setup; do not invent filesystem prefixes.