denoland/deno · error
Invalid registry configuration. Registry with schema "{}" is
Error message
Invalid registry configuration. Registry with schema "{}" is missing a path parameter in schema for variable "{}". What it means
Inverse check of the previous one, cli/lsp/registries.rs:343: every declared variable must correspond to an actual path parameter in the schema. key_names is built from the schema's placeholders; if a variable's key is not among them, the validator errors with "missing a path parameter in schema for variable". This keeps the variables array from declaring completion sources that can never be reached.
Source
Thrown at cli/lsp/registries.rs:343
for key_name in &key_names {
if !registry
.variables
.iter()
.map(|var| var.key.to_owned())
.any(|x| x == *key_name)
{
return Err(anyhow!(
"Invalid registry configuration. Registry with schema \"{}\" is missing variable declaration for key \"{}\".",
registry.schema,
key_name
));
}
}
for variable in ®istry.variables {
let key_index = key_names.iter().position(|key| *key == variable.key);
let key_index = key_index.ok_or_else(||anyhow!("Invalid registry configuration. Registry with schema \"{}\" is missing a path parameter in schema for variable \"{}\".", registry.schema, variable.key))?;
let replacement_variables = parse_replacement_variables(&variable.url);
let limited_keys = key_names.get(0..key_index).unwrap();
for v in replacement_variables {
if variable.key == v && config.version == 1 {
return Err(anyhow!(
"Invalid registry configuration. Url \"{}\" (for variable \"{}\" in registry with schema \"{}\") uses variable \"{}\", which is not allowed because that would be a self reference.",
variable.url,
variable.key,
registry.schema,
v
));
}
let key_index = limited_keys.iter().position(|key| key == &v);
if key_index.is_none() && variable.key != v {
return Err(anyhow!(View on GitHub (pinned to 89f33cbef2)
Solutions
- Add the matching placeholder to the schema ("/x/:package@:version" plus "/:tag" if a tag variable exists)
- Or delete the variable entry whose key no longer appears in the schema
- Keep schema and variables adjacent in the JSON and diff them after any rename
Example fix
// before
{ "schema": "/x/:package", "variables": [ { "key": "package", ... }, { "key": "version", ... } ] }
// after
{ "schema": "/x/:package@:version", "variables": [ { "key": "package", ... }, { "key": "version", ... } ] } Defensive patterns
Strategy: validation
Validate before calling
for (const v of r.variables) {
if (!schemaKeys.includes(v.key)) throw new Error(`variable '${v.key}' has no schema placeholder`);
} Prevention
- Keep schema and variables as one editing unit; never change one without re-checking the other
- Delete variables for path segments you hardcode into the schema
When it happens
Trigger: "variables" contains { "key": "tag" } but the schema is "/x/:package@:version" (no :tag placeholder); a schema rewrite that dropped a segment while the variables entry survived.
Common situations: Editing registry configs by duplication (copy a registry block, change the schema, forget to prune variables); schemas changed to hardcode a segment that used to be a parameter.
Related errors
- Invalid registry configuration. Expected version 1 or 2 got
- Invalid registry configuration. Registry with schema "{}" is
- Invalid registry configuration. Url "{}" (for variable "{}"
- Invalid registry configuration. Url "{}" (for variable "{}"
- Cannot create cron job, a unique name is required: received
AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16).
Data as JSON: /api/errors/06325c42ff0ad1d5.
Report an issue: GitHub.