{"record":{"id":"844e2e33748b98f0","repo":"santifer/career-ops","slug":"modes-dir-custommodesdir-not-found-using-default-modes","errorCode":null,"errorMessage":"⚠️   modes_dir \"${customModesDir}\" not found; using default modes/","messagePattern":"⚠️   modes_dir \"(.+?)\" not found; using default modes/","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"gemini-eval.mjs","lineNumber":125,"sourceCode":"    const profile = yaml.load(yamlContent);\n    if (profile && profile.language && profile.language.modes_dir) {\n      const customModesDir = profile.language.modes_dir;\n      const dirPath = resolve(CODE_ROOT, customModesDir);\n      const rel = relative(CODE_ROOT, dirPath);\n      if (rel.startsWith('..') || isAbsolute(customModesDir)) {\n        console.warn(`⚠️   modes_dir \"${customModesDir}\" escapes project root; using default modes/`);\n      } else {\n        if (existsSync(dirPath)) {\n          const candidateFiles = ['oferta.md', 'angebot.md', 'offre.md', 'kyujin.md', 'is-ilani.md', 'naukri.md'];\n          const found = candidateFiles.find((file) => existsSync(join(dirPath, file)));\n          if (found) {\n            modesDir = customModesDir;\n            evalFilename = found;\n          } else {\n            console.warn(`⚠️   No matching evaluation file found in ${customModesDir}; using default modes/oferta.md`);\n          }\n        } else {\n          console.warn(`⚠️   modes_dir \"${customModesDir}\" not found; using default modes/`);\n        }\n      }\n    }\n  } catch (err) {\n    console.warn(`⚠️   Could not parse config/profile.yml: ${err.message}`);\n  }\n}\n\nPATHS.shared = join(CODE_ROOT, modesDir, '_shared.md');\nPATHS.oferta = join(CODE_ROOT, modesDir, evalFilename);\n\n// ---------------------------------------------------------------------------\n// CLI argument parsing\n// ---------------------------------------------------------------------------\nconst args = process.argv.slice(2);\n\nif (args.length === 0 || args[0] === '--help' || args[0] === '-h') {\n  console.log(`","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/gemini-eval.mjs#L107-L143","documentation":"This warning fires when language.modes_dir in config/profile.yml names a directory that does not exist on disk (the existsSync(dirPath) check fails). The tool falls back to the default modes/ directory, so evaluation proceeds but without the market-specific modes the user intended. It is a silent-degradation warning: expect default (English) evaluation vocabulary and rules.","triggerScenarios":"config/profile.yml sets language.modes_dir to a path inside the project root that is absent — e.g. modes_dir: modes/es before creating modes/es, a typo like modes/deutsh, or the directory was deleted/renamed after the profile was written.","commonSituations":"Users enable a market mode (e.g. modes_dir: modes/ja) before checking out/copying that market directory; typos in the modes_dir value; directories lost after a repo update or incomplete manual installation; profile copied from another project whose modes layout differs.","solutions":["Check the directory exists: `ls modes/` and compare with the modes_dir value in config/profile.yml; fix typos (e.g. modes/de, not modes/deutch).","Create the missing directory and populate it from the shipped market template (copy modes/de/ for German, modes/fr/ for French, etc.).","If the market dir is not needed, remove the language.modes_dir key from config/profile.yml so the default modes/ is used without warnings."],"exampleFix":"# before (config/profile.yml)\nlanguage:\n  modes_dir: modes/dutch   # does not exist\n\n# after\nlanguage:\n  modes_dir: modes/de      # shipped German market dir\n# or create it: mkdir -p modes/dutch && cp modes/de/*.md modes/dutch/","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nimport { resolve } from 'node:path';\nconst md = profile?.language?.modes_dir;\nif (md && !existsSync(resolve(md))) {\n  console.warn(`modes_dir \"${md}\" does not exist — fix config/profile.yml or create the directory`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runEvaluation();\n} catch (err) {\n  if (/modes_dir .* not found/.test(err.message)) {\n    console.warn('Check the modes_dir path in config/profile.yml; default modes/ was used instead.');\n  } else throw err;\n}","preventionTips":["Run `ls <modes_dir>` after editing config/profile.yml to confirm the directory exists before evaluating.","Copy market dirs from templates/portals or the shipped modes/ tree rather than typing paths from memory.","Keep modes_dir values short and relative (modes/de, modes/fr) to reduce typo risk.","Re-verify the profile after repo updates that may rename or restructure modes/."],"tags":["config","directory-not-found","modes","fallback"],"backgroundTag":"directory-not-found","analyzedSha":"aac998c7ed7248ea853b720ceeb1fdbeb322fc5d","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}