slidevjs/slidev · error · Error
[slidev] "prism" support has been dropped. Please use "highl
Error message
[slidev] "prism" support has been dropped. Please use "highlighter: shiki" instead
What it means
The Slidev config loader rejects highlighter: 'prism'. Prism support was removed; 'shiki' is the only supported highlighter ('shikiji' is auto-remapped to 'shiki' with a warning).
Source
Thrown at packages/parser/src/config.ts:111
...headmatter?.htmlAttrs,
},
themeConfig: {
...defaultConfig.themeConfig,
...themeMeta.defaults?.themeConfig,
...headmatter.config?.themeConfig,
...headmatter?.themeConfig,
},
}
// @ts-expect-error compat
if (config.highlighter === 'shikiji') {
console.warn(`[slidev] "shikiji" is merged back to "shiki", you can safely change it "highlighter: shiki"`)
config.highlighter = 'shiki'
}
// @ts-expect-error compat
if (config.highlighter === 'prism')
throw new Error(`[slidev] "prism" support has been dropped. Please use "highlighter: shiki" instead`)
if (config.colorSchema !== 'dark' && config.colorSchema !== 'light')
config.colorSchema = 'auto'
if (themeColorSchema && config.colorSchema === 'auto')
config.colorSchema = themeColorSchema
config.aspectRatio = parseAspectRatio(config.aspectRatio)
if (verify)
verifyConfig(config, themeMeta)
return config
}
export function verifyConfig(
config: SlidevConfig,
themeMeta: SlidevThemeMeta = {},
warn = (v: string) => console.warn(`[slidev] ${v}`),View on GitHub (pinned to 0d798ace58)
Solutions
- Remove the highlighter: prism line to fall back to the default (shiki)
- Explicitly set highlighter: shiki
- Migrate any Prism-specific CSS/overrides to Shiki's CSS variables
Example fix
// before --- highlighter: prism --- // after --- highlighter: shiki ---
Defensive patterns
Strategy: validation
Validate before calling
if (config.highlighter && config.highlighter !== 'shiki' && config.highlighter !== 'shikiji') {
throw new Error(`Unsupported highlighter: ${config.highlighter}. Use 'shiki'.`)
} Type guard
type Highlighter = 'shiki' | 'shikiji'
function isSupportedHighlighter(v: unknown): v is Highlighter {
return v === 'shiki' || v === 'shikiji'
} Prevention
- Do not set highlighter: prism in any deck
- After upgrading Slidev, grep decks for 'prism' to catch legacy configs
When it happens
Trigger: Setting highlighter: 'prism' in the slides.md headmatter or in headmatter themeConfig / slidev config.
Common situations: Old decks created on pre-0.48 Slidev; config snippets copied from outdated documentation; CI building a legacy deck against a new Slidev.
Related errors
- `loadTheme` is no longer supported.
- Invalid aspect ratio "${str}"
- [Slidev] ogImage: ${filename} not found
- [slidev] Failed to load "${PWA_PACKAGE}", which is required
AI-assisted analysis of slidevjs/slidev@0d798ace58 (2026-08-12).
Data as JSON: /api/errors/3b6011ce8f8b608b.
Report an issue: GitHub.