{"record":{"id":"9674ab456623092f","repo":"deepseek-ai/deepseek-harness","slug":"binname-failed-to-load-env-string-error","errorCode":null,"errorMessage":"${binName}: failed to load .env: ${String(error)}\n","messagePattern":"(.+?): failed to load \\.env: (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/boot/app-boot/src/index.ts","lineNumber":86,"sourceCode":"  return resolve(dir, replayName)\n}\n\n/**\n * Load the optional gitignored `.env` from `dir`. Missing files fall back to the\n * ambient environment; other read failures are reported through `warn`.\n * @param binName - the diagnostic prefix on the warn line.\n * @param dir - the directory whose `.env` to load.\n * @param warn - sink for the one-line misconfiguration diagnostic.\n */\nexport function loadEnv(\n  binName: string, dir: string = process.cwd(),\n  warn: (line: string) => void = line => void process.stderr.write(line),\n): void {\n  try {\n    process.loadEnvFile(resolve(dir, '.env'))\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException | null)?.code !== 'ENOENT') {\n      warn(`${binName}: failed to load .env: ${String(error)}\\n`)\n    }\n    // ENOENT (no .env) is fine — rely on the ambient environment.\n  }\n}\n\n/** Exact names no discovered file may set. */\nconst BOOTSTRAP_NAMES = new Set([\n  // Process launch and module resolution.\n  'PATH', 'HOME', 'USERPROFILE', 'SHELL',\n  'NODE_OPTIONS', 'NODE_PATH', 'NODE_EXTRA_CA_CERTS',\n  'LD_PRELOAD', 'LD_LIBRARY_PATH', 'LD_AUDIT',\n  // Interpreter startup hooks.\n  'BASH_ENV', 'ENV', 'SHELLOPTS', 'BASHOPTS',\n  'PERL5OPT', 'PERL5LIB', 'PYTHONSTARTUP', 'PYTHONPATH', 'RUBYOPT', 'RUBYLIB',\n  'JAVA_TOOL_OPTIONS', '_JAVA_OPTIONS', 'JDK_JAVA_OPTIONS',\n  'PYTHONHOME',\n  // Version-control hooks, config redirects, and ambient command selectors.\n  'GIT_SSH', 'GIT_SSH_COMMAND', 'GIT_EXTERNAL_DIFF', 'GIT_PAGER', 'GIT_EDITOR',","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/boot/app-boot/src/index.ts#L68-L104","documentation":"Error \"${binName}: failed to load .env: ${String(error)}\n\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/boot/app-boot/src/index.ts:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the .env file syntax or its read permissions so the boot process can load it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}