eyaltoledano/claude-task-master · error

Project root override path does not exist: ${resolvedOverrid

Error message

Project root override path does not exist: ${resolvedOverride}

What it means

initTaskMaster() accepts a projectRoot override and strictly validates it: the resolved path must exist on disk. Unlike default root detection (which searches upward for markers), an explicit override is trusted but verified — pointing it at a nonexistent or mistyped directory fails immediately with the resolved absolute path in the message.

Source

Thrown at src/task-master.js:232

		for (const defaultPath of defaultPaths) {
			const fullPath = path.isAbsolute(defaultPath)
				? defaultPath
				: path.join(basePath || process.cwd(), defaultPath);
			if (fs.existsSync(fullPath)) {
				return fullPath;
			}
		}

		return null;
	};

	const paths = {};

	// Project Root
	if (overrides.projectRoot) {
		const resolvedOverride = path.resolve(overrides.projectRoot);
		if (!fs.existsSync(resolvedOverride)) {
			throw new Error(
				`Project root override path does not exist: ${resolvedOverride}`
			);
		}

		const hasTaskmasterDir = fs.existsSync(
			path.join(resolvedOverride, TASKMASTER_DIR)
		);
		const hasLegacyConfig = fs.existsSync(
			path.join(resolvedOverride, LEGACY_CONFIG_FILE)
		);

		if (!hasTaskmasterDir && !hasLegacyConfig) {
			throw new Error(
				`Project root override is not a valid taskmaster project: ${resolvedOverride}`
			);
		}

		paths.projectRoot = resolvedOverride;

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Correct the projectRoot value to an existing directory (the error shows the resolved absolute path to compare against).
  2. Verify the directory exists: ls <resolvedPath> or fs.existsSync in a script.
  3. Remove the override to let initTaskMaster auto-detect the root by searching for taskmaster markers.
  4. Use an absolute path in CI/containers to avoid cwd-relative surprises.

Example fix

// before
const tm = taskMaster({ projectRoot: '../my-projet' }); // typo
// after
const tm = taskMaster({ projectRoot: '/abs/path/to/my-project' });
Defensive patterns

Strategy: validation

Validate before calling

function assertProjectRoot(root) {
  const resolved = path.resolve(root);
  if (!fs.existsSync(resolved) || !fs.statSync(resolved).isDirectory()) {
    throw new Error(`projectRoot override does not exist: ${resolved}`);
  }
}
assertProjectRoot(cfg.projectRoot);

Try / catch

try {
  const tm = taskMaster({ projectRoot: cfg.projectRoot });
} catch (err) {
  if (err.message.startsWith('Project root override path does not exist')) {
    console.warn(err.message, '— falling back to auto-detection');
    const tm = taskMaster(); // no override
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: taskMaster({ projectRoot: './my-proj' }) where my-proj doesn't exist or is misspelled; projectRoot read from env/config pointing at a deleted or renamed directory; running on CI where the checkout path differs from the configured root; relative path resolved against an unexpected cwd.

Common situations: Typo in the path (e.g. ./projets instead of ./projects); project moved/renamed after config was written; Docker/CI containers mounting the repo at a different path than local config assumes.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/bae6a6743782fe70. Report an issue: GitHub.