{"record":{"id":"89bf384535943536","repo":"continuedev/continue","slug":"slug-based-package-resolution-is-not-supported","errorCode":null,"errorMessage":"Slug-based package resolution is not supported","messagePattern":"Slug-based package resolution is not supported","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/config-yaml/src/registryClient.ts","lineNumber":27,"sourceCode":"\nexport class RegistryClient implements Registry {\n  private readonly rootPath?: string;\n\n  constructor(options: RegistryClientOptions = {}) {\n    this.rootPath = options.rootPath;\n  }\n\n  async getContent(id: PackageIdentifier): Promise<string> {\n    // Return pre-read content if available (for vscode-remote:// URIs in WSL)\n    if (id.uriType === \"file\" && id.content !== undefined) {\n      return id.content;\n    }\n\n    switch (id.uriType) {\n      case \"file\":\n        return this.getContentFromFilePath(id.fileUri);\n      case \"slug\":\n        throw new Error(\"Slug-based package resolution is not supported\");\n      default:\n        throw new Error(\n          `Unknown package identifier type: ${(id as any).uriType}`,\n        );\n    }\n  }\n\n  private getContentFromFilePath(filepath: string): string {\n    if (filepath.startsWith(\"file://\")) {\n      // For Windows file:///C:/path/to/file, we need to handle it properly\n      // On other systems, we might have file:///path/to/file\n      return fs.readFileSync(new URL(filepath), \"utf8\");\n    } else if (path.isAbsolute(filepath)) {\n      return fs.readFileSync(filepath, \"utf8\");\n    } else {\n      // Try to resolve relative to current working directory first\n      const resolvedPath = path.resolve(filepath);\n      if (fs.existsSync(resolvedPath)) {","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/packages/config-yaml/src/registryClient.ts#L9-L45","documentation":"RegistryClient.getContent only supports file-based identifiers. A slug-based PackageIdentifier (owner/package) cannot be resolved because no registry backend is wired up, so it throws explicitly.","triggerScenarios":"new RegistryClient(...).getContent({uriType: 'slug', fullSlug: {...}}) — any slug identifier.","commonSituations":"Code written against a full registry assuming remote slug resolution, but running with the local file-only registry client; config blocks referencing slugs instead of file paths.","solutions":["Convert the identifier to a file URI ({uriType:'file', fileUri:'./path'}) pointing at the block's YAML file","Or use a registry implementation that supports slug resolution","Check whether your package version expects a different registry client for slug lookups"],"exampleFix":"// before\nregistry.getContent({ uriType: 'slug', fullSlug: { ownerSlug: 'o', packageSlug: 'p' } });\n// after\nregistry.getContent({ uriType: 'file', fileUri: './blocks/p.yaml' });","handlingStrategy":"type-guard","validationCode":"if (id.uriType === 'slug') { /* resolve via a slug-capable registry or convert to file */ }","typeGuard":"function isFileIdentifier(id: PackageIdentifier): id is { uriType: 'file'; fileUri: string } {\n  return id.uriType === 'file' && typeof (id as any).fileUri === 'string';\n}","tryCatchPattern":"try { await registry.getContent(id); } catch (e) { if (e.message === 'Slug-based package resolution is not supported') { /* fall back to file resolution */ } }","preventionTips":["Know your registry client's capabilities before using slug identifiers","Default to file URIs in local/file-based setups"],"tags":["registry","slug","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}