From a51f593bbdaf7a78b59e6c1ee344c94f0fc467e6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 20:06:39 +0000 Subject: [PATCH 1/2] Initial plan From bba5232f5a71b14ba947b25c41973dd21b7bd067 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 20:10:41 +0000 Subject: [PATCH 2/2] Improve doctor.mjs Playwright browser check with distinct failure modes Agent-Logs-Url: https://github.com/RajjjAryan/career-copilot/sessions/308f2dcf-d6d4-44d4-b612-d2e11a64f008 Co-authored-by: RajjjAryan <107031370+RajjjAryan@users.noreply.github.com> --- doctor.mjs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/doctor.mjs b/doctor.mjs index 42c8cae..165788b 100644 --- a/doctor.mjs +++ b/doctor.mjs @@ -42,21 +42,34 @@ function checkDependencies() { } async function checkPlaywright() { + // Step 1: Check if the playwright package can be imported + let chromium; + try { + const pw = await import('playwright'); + chromium = pw.chromium; + } catch { + return { + pass: false, + label: 'Playwright package not available', + fix: 'Run: npm install', + }; + } + + // Step 2: Check if the Chromium browser binary is installed try { - const { chromium } = await import('playwright'); const execPath = chromium.executablePath(); if (existsSync(execPath)) { - return { pass: true, label: 'Playwright chromium installed' }; + return { pass: true, label: `Playwright Chromium browser installed (${execPath})` }; } return { pass: false, - label: 'Playwright chromium not installed', + label: 'Playwright Chromium browser not installed', fix: 'Run: npx playwright install chromium', }; } catch { return { pass: false, - label: 'Playwright chromium not installed', + label: 'Playwright Chromium browser not installed', fix: 'Run: npx playwright install chromium', }; }