eyaltoledano/claude-task-master · critical · Error
Export API endpoint not configured. Please set TM_PUBLIC_BAS
Error message
Export API endpoint not configured. Please set TM_PUBLIC_BASE_DOMAIN environment variable to enable task export.
What it means
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.
Source
Thrown at packages/tm-core/src/modules/integration/services/export.service.ts:727
if (result.failedCount > 0) {
const failedTasks = result.results
.filter((r) => !r.success)
.map((r) => `${r.externalId}: ${r.error}`)
.join(', ');
console.warn(
`Warning: ${result.failedCount} tasks failed to import: ${failedTasks}`
);
}
console.log(
`Successfully exported ${result.successCount} of ${result.totalTasks} tasks to brief ${briefId}`
);
} else {
// Direct Supabase approach is no longer supported
// The extractTasks method has been removed from SupabaseRepository
// as we now exclusively use the API endpoint for exports
throw new Error(
'Export API endpoint not configured. Please set TM_PUBLIC_BASE_DOMAIN environment variable to enable task export.'
);
}
}
/**
* Extract a brief ID from raw input (ID or URL)
*/
private extractBriefId(input: string): string | null {
const raw = input?.trim() ?? '';
if (!raw) return null;
const parseUrl = (s: string): URL | null => {
try {
return new URL(s);
} catch {}
try {
return new URL(`https://${s}`);View on GitHub (pinned to c0c98d367c)
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.
Example fix
// before (shell) tm export --brief b-123 # fails: endpoint not configured // after export TM_PUBLIC_BASE_DOMAIN=app.example.com tm export --brief b-123 # or in .env: TM_PUBLIC_BASE_DOMAIN=app.example.com
Defensive patterns
Strategy: validation
Validate before calling
if (!process.env.TM_PUBLIC_BASE_DOMAIN) {
throw new Error('TM_PUBLIC_BASE_DOMAIN is not set — add it to your .env or environment before exporting');
} Try / catch
try {
await exportService.exportTasks(options);
} catch (e) {
if (e instanceof Error && /TM_PUBLIC_BASE_DOMAIN/.test(e.message)) {
console.error('Set TM_PUBLIC_BASE_DOMAIN (e.g. export TM_PUBLIC_BASE_DOMAIN=app.example.com) and retry.');
return;
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- MISSING_CONFIGURATION
- Required API key ${envVarName} for provider '${providerName}
- Could not determine project root directory
- Could not determine project root directory
- Could not determine project root directory
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/f2bc7a4b1321b031.
Report an issue: GitHub.