{"record":{"id":"7eb717e3bff2338d","repo":"neoclide/coc.nvim","slug":"extension-id-not-found","errorCode":null,"errorMessage":"extension ${id} not found","messagePattern":"extension (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/extension/manager.ts","lineNumber":627,"sourceCode":"    } else {\n      this.states.setDisable(id, false)\n      if (id.startsWith('single-')) {\n        let filepath = path.join(this.singleExtensionsRoot, `${id.replace(/^single-/, '')}.js`)\n        await this.loadExtensionFile(filepath)\n      } else {\n        let folder = this.states.getFolder(id)\n        if (folder) {\n          await this.loadExtension(folder)\n        } else {\n          void window.showWarningMessage(`Extension ${id} not found`)\n        }\n      }\n    }\n  }\n\n  public async watchExtension(id: string): Promise<void> {\n    let item = this.getExtension(id)\n    if (!item) throw new Error(`extension ${id} not found`)\n    if (id.startsWith('single-')) {\n      void window.showInformationMessage(`watching ${item.filepath}`)\n      this.disposables.push(watchFile(item.filepath, async () => {\n        await this.loadExtensionFile(item.filepath)\n        void window.showInformationMessage(`reloaded ${id}`)\n      }, global.__TEST__ === true))\n    } else {\n      let client = await workspace.fileSystemWatchers.createClient(item.directory, true)\n      if (!client) throw new Error('watchman not found')\n      void window.showInformationMessage(`watching ${item.directory}`)\n      client.subscribe('**/*.js', async () => {\n        this.reloadExtension(id).then(() => {\n          void window.showInformationMessage(`reloaded ${id}`)\n        }, onUnexpectedError)\n      })\n    }\n  }\n","sourceCodeStart":609,"sourceCodeEnd":645,"githubUrl":"https://github.com/neoclide/coc.nvim/blob/50e974d9692461a69147d5cab146a8d3e439abe4/src/extension/manager.ts#L609-L645","documentation":"watchExtension(id) in src/extension/manager.ts looks the extension up via getExtension and throws `extension <id> not found` if there is no such registered extension. Watching is only possible for extensions currently known to the manager (single-file ones use a file watcher; folder ones use a watchman client).","triggerScenarios":"Calling watchExtension with an id never loaded, already unloaded, or misspelled; invoking it from a command after the extension was removed from the registry.","commonSituations":"Development-time watch setup for an extension whose load failed earlier; stale id after an extension rename; watch command run before the extension is loaded in a fresh session.","solutions":["Load the extension first, then call watchExtension with the same id","Verify the id matches the registered extension (getExtension(id) returns an item)","Fix typos in the id passed to the watch command/configuration","Re-check that the extension wasn't disabled or unloaded before watching"],"exampleFix":"// before\nawait manager.watchExtension('coc-mydevext') // not loaded yet\n// after\nawait manager.loadExtension('~/.vim/dev/coc-mydevext')\nawait manager.watchExtension('coc-mydevext')","handlingStrategy":"validation","validationCode":"if (!manager.getExtension(id)) {\n  logger.warn(`cannot watch ${id}: not loaded`)\n  return\n}","typeGuard":null,"tryCatchPattern":"try {\n  await manager.watchExtension(id)\n} catch (e) {\n  if (/not found$/.test(e.message)) logger.warn(`watch skipped: ${id} missing`)\n  else throw e\n}","preventionTips":["Establish a load-then-watch ordering in dev tooling","Use consistent ids between load and watch calls","Cancel pending watch requests when extensions unload","Check watcher setup only for extensions that loaded successfully"],"tags":["extension-watch","registry","developer-experience"],"backgroundTag":"extension-not-registered","analyzedSha":"50e974d9692461a69147d5cab146a8d3e439abe4","analyzedAt":"2026-08-31T11:17:23.966Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}