santifer/career-ops · error · Error
Profile configuration file not found at
Error message
Profile configuration file not found at: ${customProfilePath} What it means
loadProfile() in scripts/export-ats-text.mjs throws this when an explicitly passed customProfilePath (first argument) does not exist on disk. It is a fail-fast pre-flight check before attempting to read/parse the file. It applies only to the explicit custom path branch; the default config/profile.yml path has its own distinct error.
Solutions
- Verify the path exists: run ls on the exact customProfilePath value and fix typos.
- Pass an absolute path (or resolve relative to the repo root) instead of a cwd-relative one.
- Set the CAREER_OPS_PROFILE env var to a valid path and pass null instead of a bad customProfilePath.
- Create the profile file by copying config/profile.example.yml to the intended location and filling it in.
Example fix
// before
const profile = loadProfile('config/profil.yml'); // typo
// after
const profile = loadProfile(path.resolve(__dirname, 'config/profile.yml')); Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs';
if (!existsSync(profilePath)) throw new Error(`Profile not found: ${path.resolve(profilePath)}`);
const profile = loadProfile(profilePath); Prevention
- Always resolve profile paths with path.resolve() so they are independent of cwd.
- Check existsSync() before calling loadProfile with a custom path.
- Keep profile files out of gitignore if CI needs them, or add a checkout/copy step.
- Prefer the CAREER_OPS_PROFILE env var or default config/profile.yml over ad-hoc custom paths.
When it happens
Trigger: Calling loadProfile('/path/to/profile.yml') or loadProfile(customProfilePath='...') where the file does not exist (typo, wrong cwd, deleted file, never created).
Common situations: Typo in the CLI --profile flag path; running from a different working directory so a relative path no longer resolves; profile file renamed or moved during a refactor; CI job missing a checkout/copy step for the profile.
Understand the failure class
Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.
Related errors
- config/profile.yml not found: fill it in first
- CV file not found at
- ⚠️ No matching evaluation file found in
- portals file not found
- portals.yml not found
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/ffd4b80537015409.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/export-ats-text.mjs:221
education = raw.education;
} else if (Array.isArray(cvData.education) && cvData.education.length > 0) {
education = cvData.education;
}
return { name, email, phone, location, linkedin, summary, experience, education, skills };
}
/**
* Loads profile and CV data from file paths or default paths.
* Fails closed if real profile configuration is missing.
*/
export function loadProfile(customProfilePath = null, customCvPath = null) {
let profileRaw = null;
const profileSource = customProfilePath || process.env.CAREER_OPS_PROFILE || 'config/profile.yml';
if (customProfilePath) {
if (!existsSync(customProfilePath)) {
throw new Error(`Profile configuration file not found at: ${customProfilePath}`);
}
try {
const content = readFileSync(customProfilePath, 'utf8');
profileRaw = yaml.load(content);
if (!profileRaw || typeof profileRaw !== 'object') {
throw new Error(`Invalid YAML in profile file: ${customProfilePath}`);
}
} catch (err) {
throw new Error(`Failed to read profile file at ${customProfilePath}: ${err.message}`);
}
} else {
if (!existsSync(profileSource)) {
throw new Error('config/profile.yml not found: fill it in first');
}
try {
const content = readFileSync(profileSource, 'utf8');
profileRaw = yaml.load(content);
if (!profileRaw || typeof profileRaw !== 'object') {View on GitHub (pinned to aac998c7ed)