laurent22/joplin · error · Error
Cannot find "%s".
Error message
Cannot find "%s".
What it means
The 'done' command loads the note via app().loadItem, runs encryptionCheck, then checks for null and throws 'Cannot find' if the note does not exist. The message is i18n-translated.
Source
Thrown at packages/app-cli/app/command-done.ts:21
import { _ } from '@joplin/lib/locale';
import { ModelType } from '@joplin/lib/BaseModel';
import Note from '@joplin/lib/models/Note';
import time from '@joplin/lib/time';
import { NoteEntity } from '@joplin/lib/services/database/types';
class Command extends BaseCommand {
public override usage() {
return 'done <note>';
}
public override description() {
return _('Marks a to-do as done.');
}
public static async handleAction(commandInstance: BaseCommand, args: { note: string }, isCompleted: boolean) {
const note: NoteEntity = await app().loadItem(ModelType.Note, args.note);
commandInstance.encryptionCheck(note);
if (!note) throw new Error(_('Cannot find "%s".', args.note));
if (!note.is_todo) throw new Error(_('Note is not a to-do: "%s"', args.note));
const todoCompleted = !!note.todo_completed;
if (isCompleted === todoCompleted) return;
await Note.save({
id: note.id,
todo_completed: isCompleted ? time.unixMs() : 0,
});
}
public override async action(args: { note: string }) {
await Command.handleAction(this, args, true);
}
}
module.exports = Command;View on GitHub (pinned to 2654b33620)
Solutions
- Verify the title/id with 'ls'.
- Switch notebooks with 'use <notebook>'.
- Sync to pull missing notes.
- Use the note id if the title is ambiguous.
Example fix
# before # joplin done task42 # does not exist # after # joplin done "task 42"
Defensive patterns
Strategy: validation
Validate before calling
const note = await app().loadItem(ModelType.Note, args.note);
if (!note) {
console.error(`Note not found: ${args.note}`);
return;
} Try / catch
try {
await Command.handleAction(this, args, isCompleted);
} catch (e) {
if (/Cannot find/.test(e.message)) console.error(e.message);
} Prevention
- Confirm the note title/id with 'ls' before 'done'.
- Ensure the correct notebook is current with 'use'.
- Verify the note is a todo (is_todo) before toggling.
When it happens
Trigger: Running 'done <note>' where <note> matches no note title or id in the current notebook.
Common situations: Typo in the title; note in a different notebook; note not synced; note deleted.
Related errors
- More than one item match "%s". Please narrow down your query
- Cannot find "%s".
- No notebook has been specified.
- Cannot find "%s".
- Cannot find "%s".
AI-assisted analysis of laurent22/joplin@2654b33620 (2026-08-12).
Data as JSON: /api/errors/93973b5842d742ab.
Report an issue: GitHub.