neoclide/coc.nvim · error
"${url}" is not supported, coc.nvim support github.com only
Error message
"${url}" is not supported, coc.nvim support github.com only What it means
thrown by getInfoFromUri when the extension URL cannot be parsed as a URL at all (new URL(url) throws). coc.nvim's GitHub-based installer only accepts well-formed https://github.com URLs, so malformed input is rejected immediately.
Source
Thrown at src/extension/installer.ts:252
if (!obj) throw new Error(`${this.def} doesn't exists in ${registry}.`)
let requiredVersion = obj['engines'] && obj['engines']['coc']
if (!requiredVersion) throw new Error(`${this.def} is not a valid coc extension, "engines" field with coc property required.`)
extensionPath(this.root, res.name)
return {
'dist.tarball': obj['dist']['tarball'],
'engines.coc': requiredVersion,
version: obj['version'],
name: res.name
} as Info
}
public async getInfoFromUri(): Promise<Info> {
let { url } = this
let repository: URL
try {
repository = new URL(url)
} catch (_e) {
throw new Error(`"${url}" is not supported, coc.nvim support github.com only`)
}
if (repository.protocol !== 'https:' || repository.hostname !== 'github.com') {
throw new Error(`"${url}" is not supported, coc.nvim support github.com only`)
}
url = url.replace(/\/$/, '')
let branch = 'master'
if (url.includes('@')) {
// https://github.com/sdras/vue-vscode-snippets@main
let idx = url.indexOf('@')
branch = url.substring(idx + 1)
url = url.substring(0, idx)
}
let fileUrl = url.replace('github.com', 'raw.githubusercontent.com') + `/${branch}/package.json`
this.log(`Get info from ${fileUrl}`)
let content = await this.fetch(fileUrl, { timeout: 10000 })
let obj = typeof content == 'string' ? JSON.parse(content) : content
extensionPath(this.root, obj.name)
this.name = obj.nameView on GitHub (pinned to 50e974d969)
Solutions
- Use a full https URL: https://github.com/<user>/<repo>.
- Remove the trailing '@branch' shorthand errors — the format is https://github.com/user/repo@branch.
- Convert SSH (git@github.com:owner/repo) to HTTPS form.
- Validate the URL string in your config before passing it to the installer.
Example fix
// before url: 'github.com/chemzqm/ws' // after url: 'https://github.com/chemzqm/ws'
Defensive patterns
Strategy: validation
Validate before calling
function isParseableUrl(u) { try { new URL(u); return true } catch { return false } }
if (!isParseableUrl(url)) throw new Error(`malformed extension url: ${url}`) Type guard
function isAbsoluteHttpsUrl(u) { try { const x = new URL(u); return x.protocol === 'https:' && !!x.hostname } catch { return false } } Try / catch
try { await installer.install() } catch (e) { if (e.message.includes('is not supported, coc.nvim support github.com only')) { /* fix url in config */ } else { throw e } } Prevention
- Always use fully-qualified https:// URLs in extension configs
- Convert SSH (git@github.com:) URLs to https form
- Lint extension url fields in coc-settings.json
When it happens
Trigger: Calling install/update with a shorthand like 'user/repo' with a scheme that URL() can't parse, a typo'd URL (spaces, missing scheme like 'github.com/user/repo'), or garbage input.
Common situations: Users paste git@github.com:... SSH URLs or bare repo paths into coc extensions config; config file has a URL without the https:// prefix.
Related errors
- ${this.def} doesn't exists in ${registry}.
- ${this.def} is not a valid coc extension, "engines" field wi
- ${name} ${info.version} requires coc.nvim >= ${required}, pl
AI-assisted analysis of neoclide/coc.nvim@50e974d969 (2026-08-31).
Data as JSON: /api/errors/9e63f5fdc376aee1.
Report an issue: GitHub.