{"record":{"id":"f2bc7a4b1321b031","repo":"eyaltoledano/claude-task-master","slug":"export-api-endpoint-not-configured-please-set-tm","errorCode":null,"errorMessage":"Export API endpoint not configured. Please set TM_PUBLIC_BASE_DOMAIN environment variable to enable task export.","messagePattern":"Export API endpoint not configured\\. Please set TM_PUBLIC_BASE_DOMAIN environment variable to enable task export\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/tm-core/src/modules/integration/services/export.service.ts","lineNumber":727,"sourceCode":"\n\t\t\tif (result.failedCount > 0) {\n\t\t\t\tconst failedTasks = result.results\n\t\t\t\t\t.filter((r) => !r.success)\n\t\t\t\t\t.map((r) => `${r.externalId}: ${r.error}`)\n\t\t\t\t\t.join(', ');\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Warning: ${result.failedCount} tasks failed to import: ${failedTasks}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconsole.log(\n\t\t\t\t`Successfully exported ${result.successCount} of ${result.totalTasks} tasks to brief ${briefId}`\n\t\t\t);\n\t\t} else {\n\t\t\t// Direct Supabase approach is no longer supported\n\t\t\t// The extractTasks method has been removed from SupabaseRepository\n\t\t\t// as we now exclusively use the API endpoint for exports\n\t\t\tthrow new Error(\n\t\t\t\t'Export API endpoint not configured. Please set TM_PUBLIC_BASE_DOMAIN environment variable to enable task export.'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Extract a brief ID from raw input (ID or URL)\n\t */\n\tprivate extractBriefId(input: string): string | null {\n\t\tconst raw = input?.trim() ?? '';\n\t\tif (!raw) return null;\n\n\t\tconst parseUrl = (s: string): URL | null => {\n\t\t\ttry {\n\t\t\t\treturn new URL(s);\n\t\t\t} catch {}\n\t\t\ttry {\n\t\t\t\treturn new URL(`https://${s}`);","sourceCodeStart":709,"sourceCodeEnd":745,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/packages/tm-core/src/modules/integration/services/export.service.ts#L709-L745","documentation":"performExport() now exclusively uses the HTTP API endpoint for exports; the direct-Supabase path was removed. If the API URL cannot be constructed (no TM_PUBLIC_BASE_DOMAIN configured, so apiUrl is falsy), it throws a plain Error telling the user to set TM_PUBLIC_BASE_DOMAIN. This is a build/environment configuration failure, not a runtime auth issue.","triggerScenarios":"Calling exportTasks()/performExport() in an environment where TM_PUBLIC_BASE_DOMAIN is unset or empty so the export API endpoint URL cannot be built (self-hosted install, CI job without env vars, custom build missing the baked-in default).","commonSituations":"Self-hosting Task Master without the public base domain env var; .env not loaded in CI; upgrading to a version that removed the Supabase-direct export path while relying on the old configuration; building from source without the standard env template.","solutions":["Set TM_PUBLIC_BASE_DOMAIN in your environment (e.g. TM_PUBLIC_BASE_DOMAIN=app.example.com) and retry.","Add the variable to your .env file / CI secret store so it is present at process start.","If upgrading from an older version, migrate config from the removed Supabase-direct setup to the API-endpoint-based configuration.","Verify the variable is actually loaded (print it at startup) — a set-but-not-loaded .env still triggers this."],"exampleFix":"// before (shell)\ntm export --brief b-123   # fails: endpoint not configured\n// after\nexport TM_PUBLIC_BASE_DOMAIN=app.example.com\ntm export --brief b-123\n# or in .env: TM_PUBLIC_BASE_DOMAIN=app.example.com","handlingStrategy":"validation","validationCode":"if (!process.env.TM_PUBLIC_BASE_DOMAIN) {\n  throw new Error('TM_PUBLIC_BASE_DOMAIN is not set — add it to your .env or environment before exporting');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await exportService.exportTasks(options);\n} catch (e) {\n  if (e instanceof Error && /TM_PUBLIC_BASE_DOMAIN/.test(e.message)) {\n    console.error('Set TM_PUBLIC_BASE_DOMAIN (e.g. export TM_PUBLIC_BASE_DOMAIN=app.example.com) and retry.');\n    return;\n  }\n  throw e;\n}","preventionTips":["Set TM_PUBLIC_BASE_DOMAIN in .env and commit a .env.example documenting it","Ensure CI loads env files / configures secrets before running export commands","Assert required env vars at process startup with a fail-fast check","After upgrading versions, re-check env requirements — the Supabase-direct export path was removed in favor of the API endpoint"],"tags":["configuration","environment","export","env-var"],"backgroundTag":"missing-env-var","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}