{"record":{"id":"cd0ca0adc0b0ec6a","repo":"can1357/oh-my-pi","slug":"marketplace-catalog-not-found-at-tried-map-p","errorCode":null,"errorMessage":"Marketplace catalog not found at ${tried.map(p => `\"${p}\"`).join(\" or \")}. Ensure the directory exists and contains one of: ${CATALOG_RELATIVE_PATHS.join(\", \")}.","messagePattern":"Marketplace catalog not found at (.+?)\"`\\)\\.join\\(\" or \"\\)\\}\\. Ensure the directory exists and contains one of: (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/extensibility/plugins/marketplace/fetcher.ts","lineNumber":219,"sourceCode":"\nasync function readMarketplaceCatalog(\n\troot: string,\n\toptions: { relativeDisplayPaths?: boolean } = {},\n): Promise<{ catalogPath: string; displayPath: string; content: string }> {\n\tconst tried: string[] = [];\n\tfor (const rel of CATALOG_RELATIVE_PATHS) {\n\t\tconst catalogPath = path.join(root, ...rel.split(\"/\"));\n\t\tconst displayPath = options.relativeDisplayPaths ? rel : catalogPath;\n\t\ttried.push(displayPath);\n\t\ttry {\n\t\t\tconst content = await Bun.file(catalogPath).text();\n\t\t\treturn { catalogPath, displayPath, content };\n\t\t} catch (err) {\n\t\t\tif (isEnoent(err)) continue;\n\t\t\tthrow err;\n\t\t}\n\t}\n\tthrow new Error(\n\t\t`Marketplace catalog not found at ${tried.map(p => `\"${p}\"`).join(\" or \")}. ` +\n\t\t\t`Ensure the directory exists and contains one of: ${CATALOG_RELATIVE_PATHS.join(\", \")}.`,\n\t);\n}\n\n/**\n * Expand a `~/...` path to an absolute path using os.homedir().\n * Other paths are returned unchanged.\n */\nfunction expandHome(p: string): string {\n\tif (p.startsWith(\"~/\")) {\n\t\treturn path.join(os.homedir(), p.slice(2));\n\t}\n\treturn p;\n}\n\n/**\n * Fetch a marketplace catalog from a source.","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/extensibility/plugins/marketplace/fetcher.ts#L201-L237","documentation":"readMarketplaceCatalog probes a directory for each known catalog relative path (CATALOG_RELATIVE_PATHS) and throws this when none exist (every attempt failed with ENOENT). It means the given marketplace directory exists as searched or simply contains no recognized catalog file. The message lists every path that was tried.","triggerScenarios":"readMarketplaceCatalog(dir) called on a directory missing marketplace.json / .omp/catalog-like files — e.g. after cloning a repo whose catalog lives at a nonstandard path, or passing a wrong/empty directory.","commonSituations":"Adding a marketplace from a git URL whose repo root has no catalog file; a typo in a local directory path; the repo restructured and moved the catalog; cloning an empty or unrelated repository.","solutions":["Verify the directory contains one of the supported catalog files listed in the error message (e.g. marketplace.json) at the repo root or expected relative path.","If the catalog lives in a subdirectory, point the source at that subdirectory (for git sources, use the subpath syntax the source supports).","Fix a mistyped local path or re-clone/re-add the marketplace if the upstream moved the file."],"exampleFix":"// before: adding a repo without a catalog at root\nawait manager.addMarketplace(\"github:org/some-random-repo\");\n// after: repo has catalog under docs/\nawait manager.addMarketplace(\"github:org/some-random-repo/docs\");","handlingStrategy":"validation","validationCode":"import * as fs from \"node:fs\";\nconst candidates = [\"marketplace.json\", \".omp/marketplace.json\"]; // match CATALOG_RELATIVE_PATHS\nif (!candidates.some(p => fs.existsSync(new URL(`${dir}/${p}`, \"file://\")))) {\n  throw new Error(`Directory ${dir} has no marketplace catalog file`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const { content } = await readMarketplaceCatalog(dir);\n} catch (err) {\n  if ((err as Error).message.includes(\"not found at\")) {\n    // check dir contents / inform user which files are expected\n  } else throw err;\n}","preventionTips":["Ensure marketplace repos ship the catalog at a supported relative path (one of CATALOG_RELATIVE_PATHS).","Verify local directory paths before passing them to the fetcher.","When a repo restructures, update the source path to the subdirectory containing the catalog."],"tags":["filesystem","missing-file","marketplace","enoent"],"backgroundTag":"catalog-file-not-found","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}