{"record":{"id":"30cf42c9ed740989","repo":"neoclide/coc.nvim","slug":"this-def-doesn-t-exists-in-registry","errorCode":null,"errorMessage":"${this.def} doesn't exists in ${registry}.","messagePattern":"(.+?) doesn't exists in (.+?)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/extension/installer.ts","lineNumber":234,"sourceCode":"        let published = Date.parse(res.time?.[this.version])\n        if (!Number.isFinite(published) || published > cutoff) {\n          let versions = Object.keys(res.versions ?? {}).filter(version => {\n            let published = Date.parse(res.time?.[version])\n            return Number.isFinite(published) && published <= cutoff\n          })\n          this.version = semver.maxSatisfying(versions, '*') ?? undefined\n          if (!this.version) throw new Error(`${this.def} has no release older than ${releaseAge} days.`)\n        }\n      }\n    } else if (releaseAge > 0) {\n      let published = Date.parse(res.time?.[this.version])\n      let cutoff = Date.now() - releaseAge * 24 * 60 * 60 * 1000\n      if (!Number.isFinite(published) || published > cutoff) {\n        throw new Error(`${this.def} is not older than ${releaseAge} days.`)\n      }\n    }\n    let obj = res['versions'][this.version]\n    if (!obj) throw new Error(`${this.def} doesn't exists in ${registry}.`)\n    let requiredVersion = obj['engines'] && obj['engines']['coc']\n    if (!requiredVersion) throw new Error(`${this.def} is not a valid coc extension, \"engines\" field with coc property required.`)\n    extensionPath(this.root, res.name)\n    return {\n      'dist.tarball': obj['dist']['tarball'],\n      'engines.coc': requiredVersion,\n      version: obj['version'],\n      name: res.name\n    } as Info\n  }\n\n  public async getInfoFromUri(): Promise<Info> {\n    let { url } = this\n    let repository: URL\n    try {\n      repository = new URL(url)\n    } catch (_e) {\n      throw new Error(`\"${url}\" is not supported, coc.nvim support github.com only`)","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/neoclide/coc.nvim/blob/50e974d9692461a69147d5cab146a8d3e439abe4/src/extension/installer.ts#L216-L252","documentation":" thrown when the npm registry response contains no entry for the requested extension version in res['versions'][this.version]. coc.nvim throws it because it cannot read the metadata (engines, dist tarball) it needs to install that specific version. It means the exact version does not exist in the registry being queried.","triggerScenarios":"Calling the installer's getInfo (via info) with a def/url pinning a version (e.g. name@1.2.3) that the registry has never published, or a registry mirror that lacks the version.","commonSituations":"Typo in version string; asking for a version that was unpublished (npm unpublish); using a private/custom registry that doesn't mirror all versions; stale registry cache.","solutions":["Check the exact version exists: npm view <name>@<version> version against the same registry.","Remove the pinned version from the extension def so the latest version is used.","Verify/fix the registry configured for coc extensions (point to registry.npmjs.org or a complete mirror).","List available versions (npm view <name> versions) and pick a published one."],"exampleFix":"// before\nnew Installer({ def: 'coc-json@9.9.9', root })  // version never published\n// after\nnew Installer({ def: 'coc-json@1.8.0', root })  // a version published in the registry","handlingStrategy":"validation","validationCode":"const versions = await npmViewVersions(name, registry)\nif (!versions.includes(pinnedVersion)) throw new Error(`${name}@${pinnedVersion} not in registry`)\nawait installer.install()","typeGuard":"function hasVersion(res, v) { return typeof res === 'object' && res !== null && typeof res.versions === 'object' && res.versions !== null && v in res.versions }","tryCatchPattern":"try { await installer.install() } catch (e) { if (String(e.message).endsWith(`doesn't exists in ${registry}.`)) { /* fall back to latest version */ } else { throw e } }","preventionTips":["Verify pinned versions with npm view <name>@<version> before installing","Avoid pinning versions in extension defs unless necessary","Use a complete, current registry mirror"],"tags":["npm-registry","versioning","extension-install"],"backgroundTag":"npm-version-not-found","analyzedSha":"50e974d9692461a69147d5cab146a8d3e439abe4","analyzedAt":"2026-08-31T11:17:23.966Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}