slidevjs/slidev · error · Error
No project found for entry: ${entry}. All entries: ${formatL
Error message
No project found for entry: ${entry}. All entries: ${formatList(projects.keys())} What it means
Thrown by `resolveProjectFromEntry` when the entry is not a direct key in the `projects` map AND no loaded project's entry path contains the (slash-normalized) input as a substring. The message lists every loaded entry via `formatList(projects.keys())` so the caller can pick a correct one. This is the 'zero matches' branch of the fuzzy fallback.
Source
Thrown at packages/vscode/src/lmTools.ts:125
}
},
}))
}
function resolveProjectFromEntry(entry: string) {
if (entry === '' || entry === '$ACTIVE_SLIDE_ENTRY') {
if (!activeEntry.value) {
throw new Error('No active slide entry found. Please set an active slide entry before using this tool.')
}
entry = activeEntry.value
}
let project = projects.get(entry)
if (!project) {
entry = slash(entry)
const possibleProjects = [...projects.values()].filter(p => p.entry.includes(entry))
if (possibleProjects.length === 0) {
throw new Error(`No project found for entry: ${entry}. All entries: ${formatList(projects.keys())}`)
}
else if (possibleProjects.length > 1) {
throw new Error(`Multiple projects found for entry: ${entry}. Please specify the full path. All entries: ${formatList(projects.keys())}`)
}
else {
project = possibleProjects[0]
}
}
return project
}
function formatList(items: Iterable<string>): string {
const itemsArray = [...items]
if (itemsArray.length === 0) {
return 'No items found.'
}
return itemsArray.map(item => `- ${item}\n`).join('')View on GitHub (pinned to 0d798ace58)
Solutions
- Call `slidev_listEntries` and pass one of the returned entry paths verbatim.
- Pass the full absolute path to the entry file rather than a short relative fragment.
- If the project was closed, reopen the deck / restart the preview so it re-registers in the `projects` map.
- Verify the path separators and casing match what `slidev_listEntries` reports.
Example fix
// before: substring matches nothing
{ entrySlidePath: './deck/slides.md', slideNo: 1 } // throws [48]
// after: use a path reported by slidev_listEntries
{ entrySlidePath: '/Users/me/project/deck/slides.md', slideNo: 1 } Defensive patterns
Strategy: validation
Validate before calling
// Before calling a tool with an entry fragment, confirm it matches a loaded project:
import { slash } from '@antfu/utils'
import { projects } from './projects'
function matchesExactlyOneEntry(fragment: string): boolean {
const f = slash(fragment)
if (projects.has(fragment)) return true
const hits = [...projects.values()].filter(p => p.entry.includes(f))
return hits.length === 1
} Type guard
function entryResolves(fragment: string): boolean {
const f = slash(fragment)
return projects.has(fragment)
|| [...projects.values()].filter(p => p.entry.includes(f)).length === 1
} Prevention
- Prefer the full absolute entry path returned by `slidev_listEntries`.
- Call `slidev_listEntries` whenever an entry path is rejected to see the valid options.
- Reopen/re-preview the deck if the project was closed and removed from the map.
- Watch for casing/separator differences; `slash()` normalizes backslashes but not case.
When it happens
Trigger: The model passes an `entrySlidePath` that is a typo, a relative path that doesn't appear as a substring of any loaded entry, a path from a different workspace, or a path with mismatched casing/separators that survives `slash()` normalization but still matches nothing.
Common situations: Wrong working directory assumption, the deck file was renamed/moved since the model last saw it, Windows backslash vs POSIX slash mismatches not fully reconciled by `slash()`, or the project was closed/disposed and removed from the `projects` map.
Related errors
- Multiple projects found for entry: ${entry}. Please specify
- No active slide project found.
- No content found for slide number ${input.slideNo} in entry:
- No slide found with title: "${input.title}".
- entrySlidePath is required.
AI-assisted analysis of slidevjs/slidev@0d798ace58 (2026-08-12).
Data as JSON: /api/errors/0472969e3b9faafb.
Report an issue: GitHub.