Fission-AI/OpenSpec · error · Error
Cannot access path "${targetPath}": ${error.message}
Error message
Cannot access path "${targetPath}": ${error.message} What it means
Error "Cannot access path "${targetPath}": ${error.message}" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/cli/index.ts:246
.option('--no-copilot-cloud', 'Skip GitHub Copilot cloud coding-agent files without prompting')
.action(async (targetPath = '.', options?: { tools?: string; language?: string; force?: boolean; profile?: string; animation?: boolean; copilotCloud?: boolean }) => {
try {
// Validate that the path is a valid directory
const resolvedPath = path.resolve(targetPath);
try {
const stats = await fs.stat(resolvedPath);
if (!stats.isDirectory()) {
throw new Error(`Path "${targetPath}" is not a directory`);
}
} catch (error: any) {
if (error.code === 'ENOENT') {
// Directory doesn't exist, but we can create it
console.log(`Directory "${targetPath}" doesn't exist, it will be created.`);
} else if (error.message && error.message.includes('not a directory')) {
throw error;
} else {
throw new Error(`Cannot access path "${targetPath}": ${error.message}`);
}
}
const { InitCommand } = await import('../core/init.js');
const initCommand = new InitCommand({
tools: options?.tools,
language: options?.language,
force: options?.force,
profile: options?.profile,
animation: options?.animation,
copilotCloud: options?.copilotCloud,
});
await initCommand.execute(targetPath);
} catch (error) {
failWithError(error);
process.exit(1);
}
});View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/cli/index.ts:246 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/71ef73d5448af793.
Report an issue: GitHub.