{"record":{"id":"307034ca956d17a9","repo":"ruvnet/ruflo","slug":"import-file-not-found-resolved","errorCode":null,"errorMessage":"Import file not found: ${resolved}","messagePattern":"Import file not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/services/config-file-manager.ts","lineNumber":154,"sourceCode":"    const targetPath = this.configPath ?? path.resolve(cwd, CONFIG_FILENAMES[0]);\n    this.writeAtomic(targetPath, DEFAULT_CONFIG);\n    this.config = { ...DEFAULT_CONFIG };\n    this.configPath = targetPath;\n    return targetPath;\n  }\n\n  /** Export config to a specific path */\n  exportTo(cwd: string, exportPath: string): void {\n    const config = this.getConfig(cwd);\n    const resolved = path.resolve(cwd, exportPath);\n    this.writeAtomic(resolved, config);\n  }\n\n  /** Import config from a specific path */\n  importFrom(cwd: string, importPath: string): void {\n    const resolved = path.resolve(cwd, importPath);\n    if (!fs.existsSync(resolved)) {\n      throw new Error(`Import file not found: ${resolved}`);\n    }\n    const content = fs.readFileSync(resolved, 'utf-8');\n    let imported: Record<string, unknown>;\n    try {\n      imported = JSON.parse(content);\n    } catch {\n      throw new Error(`Invalid JSON in import file: ${resolved}`);\n    }\n    if (typeof imported !== 'object' || imported === null || Array.isArray(imported)) {\n      throw new Error('Import file must contain a JSON object');\n    }\n    const targetPath = this.configPath ?? path.resolve(cwd, CONFIG_FILENAMES[0]);\n    this.writeAtomic(targetPath, imported);\n    this.config = imported;\n    this.configPath = targetPath;\n  }\n\n  /** Get the path to the current config file */","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/src/services/config-file-manager.ts#L136-L172","documentation":"importFrom() resolved the caller-supplied import path against cwd and the fs.existsSync check found no file there, so the import cannot proceed. Fires when an export was never created, was written to a different directory, or the path was typo'd. The full resolved path is included to show where the manager looked.","triggerScenarios":"Thrown at v3/@claude-flow/cli/src/services/config-file-manager.ts:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the import file path exists before importing","Use an absolute path or a path relative to the current working directory"],"exampleFix":"Verify the import file path exists before importing: check the path is correct and the file is readable, then retry the import command.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}