santifer/career-ops · warning

Dashboard build skipped — go compiler not in env

Error message

Dashboard build skipped — go compiler not in env

What it means

test-all.mjs probes for a Go toolchain by running `go version`; if that fails, it warns that the dashboard Go build test was skipped instead of failing the suite. The suite degrades gracefully because Go is an optional build dependency, not a requirement to validate the rest of the repo.

Solutions

  1. Install the Go toolchain (golang.org/dl or the OS package manager) so the dashboard build test runs.
  2. If installed, verify `go version` works in the exact shell running test-all.mjs; fix PATH if not.
  3. Accept the skip if you do not work on dashboard/: it is an intentional warning, not an error.
  4. Pin Go in CI by adding a setup step (e.g. actions/setup-go) so the test is not silently skipped.

Example fix

// before (CI workflow)
- run: npm test
// after
- uses: actions/setup-go@v5
  with: { go-version: 'stable' }
- run: npm test
Defensive patterns

Strategy: fallback

Validate before calling

let hasGo = false; try { execSync('go version', { stdio: 'ignore' }); hasGo = true; } catch {} if (!hasGo) console.warn('go not available; dashboard build tests will be skipped');

Try / catch

try { execSync('go version', { stdio: 'ignore' }); } catch { console.warn('Dashboard build skipped — install Go to run this test'); }

Prevention

When it happens

Trigger: `execSync('go version', { stdio: 'ignore' })` throws — the go binary is not installed, not on PATH for the current shell/CI image, or a broken GOROOT makes it exit non-zero.

Common situations: Fresh CI containers (e.g. a node:* Docker image with no Go), contributors who never installed Go, PATH differences between login shells and CI steps, or upgrading to a Node-only environment after the dashboard was added.

Related errors


AI-assisted analysis of santifer/career-ops@e7abd431fc (2026-09-16). Data as JSON: /api/errors/d19b95e840111f05. Report an issue: GitHub.

Appendix: source

Thrown at test-all.mjs:1721

  if (typeof installEgressGuard !== 'function') {
    fail('archive-posting does not export installEgressGuard');
  }
} catch (e) {
  fail(`archive-posting egress guard tests crashed: ${e.message}`);
}

// ── 4. DASHBOARD BUILD ──────────────────────────────────────────

if (!QUICK) {
  console.log('\n4. Dashboard build');
  let hasGo = false;
  try {
    execSync('go version', { stdio: 'ignore' });
    hasGo = true;
  } catch {}
  if (!hasGo) {
    warn('Dashboard build skipped — go compiler not in env');
  } else {
    const isWindows = process.platform === 'win32';
    const dashboardBuildTmp = mkdtempSync(join(tmpdir(), 'career-dashboard-build-'));
    const outPath = join(dashboardBuildTmp, isWindows ? 'career-dashboard-test.exe' : 'career-dashboard-test');
    const goEnv = { ...process.env };
    if (isWindows && !goEnv.GOCACHE) {
      goEnv.GOCACHE = join(tmpdir(), 'career-ops-go-build-cache');
    }
    if (goEnv.GOCACHE) {
      try { mkdirSync(goEnv.GOCACHE, { recursive: true }); } catch (e) {}
    }
    const goBuild = run('go', ['build', '-o', outPath, '.'], {
      cwd: join(ROOT, 'dashboard'),
      env: goEnv,
      stdio: ['pipe', 'pipe', 'pipe'],
      timeout: 60000,
    });
    if (goBuild !== null) {

View on GitHub (pinned to e7abd431fc)