nanocoai/nanoclaw · error · Error
nothing to update — provide at least one of: ${updatableCols
Error message
nothing to update — provide at least one of: ${updatableCols.map((c) => '--' + c.name.replace(/_/g, '-')).join(', ')} What it means
Thrown by genericUpdate in src/cli/crud.ts when the update args contain none of the resource's updatable columns — the UPDATE would be a no-op. The error enumerates every accepted flag so the caller can correct the invocation.
Source
Thrown at src/cli/crud.ts:327
function genericUpdate(def: ResourceDef) {
const updatableCols = def.columns.filter((c) => c.updatable);
const cols = visibleColumns(def).join(', ');
return async (args: Record<string, unknown>) => {
const id = args.id as string;
if (!id) throw new Error(`${def.name} id is required`);
const updates: Record<string, unknown> = {};
for (const col of updatableCols) {
const v = args[col.name];
if (v !== undefined) {
if (col.enum && !col.enum.includes(String(v))) {
throw new Error(`${col.name} must be one of: ${col.enum.join(', ')}`);
}
updates[col.name] = col.type === 'number' ? Number(v) : v;
}
}
if (Object.keys(updates).length === 0) {
throw new Error(
`nothing to update — provide at least one of: ${updatableCols.map((c) => '--' + c.name.replace(/_/g, '-')).join(', ')}`,
);
}
if (def.preUpdate) {
const current = await getDb().get<Record<string, unknown>>(
`SELECT ${cols} FROM ${def.table} WHERE ${def.idColumn} = ?`,
id,
);
if (!current) throw new Error(`${def.name} not found: ${id}`);
await def.preUpdate(updates, current);
}
const setClause = Object.keys(updates)
.map((k) => `${k} = @${k}`)
.join(', ');
const result = await getDb().run(`UPDATE ${def.table} SET ${setClause} WHERE ${def.idColumn} = @_id`, {
...updates,View on GitHub (pinned to 294ef2aee8)
Solutions
- Add at least one of the flags listed in the message
- If the field you want is absent from the list, it is not updatable — use the dedicated command or accept it's immutable
Example fix
# before ncl groups update --id my-group # after ncl groups update --id my-group --personality friendly
Defensive patterns
Strategy: validation
Validate before calling
const updatable = Object.keys(args).filter(k => k !== 'id' && updatableNames.includes(k));
if (updatable.length === 0) { console.error('nothing to update'); process.exit(1); } Prevention
- Skip the update call entirely when no fields changed
- Only pass columns flagged updatable in the resource help
When it happens
Trigger: `ncl <resource> update --id <id>` with no field flags, or with only non-updatable column flags (e.g. trying to change an id or created_at).
Common situations: Attempting to modify a computed/system column; scripts where the field flags failed to parse; misunderstanding which columns are mutable.
Related errors
- ${def.name} id is required
- ${def.name} not found: ${id}
- ${col.name} must be one of: ${col.enum.join(', ')}
- --${col.name.replace(/_/g, '-')} is required
- --${column.name.replace(/_/g, '-')} must be true or false
AI-assisted analysis of nanocoai/nanoclaw@294ef2aee8 (2026-08-28).
Data as JSON: /api/errors/94207645627290c9.
Report an issue: GitHub.