vuetifyjs/vuetify · critical · Error
[Vuetify] Could not find injected rtl instance
Error message
[Vuetify] Could not find injected rtl instance
What it means
useRtl() injects LocaleSymbol (the same global locale adapter, which also carries isRtl and rtlClasses). Despite the message naming 'rtl instance', the missing provide is the locale one installed by createVuetify(). It throws when Vuetify is not installed on the app.
Source
Thrown at packages/vuetify/src/composables/locale.ts:158
rtl,
rtlClasses: toRef(() => `v-locale--is-${isRtl.value ? 'rtl' : 'ltr'}`),
}
}
export function provideRtl (locale: LocaleInstance, rtl: RtlInstance['rtl'], props: RtlProps): RtlInstance {
const isRtl = computed(() => props.rtl ?? rtl.value[locale.current.value] ?? false)
return {
isRtl,
rtl,
rtlClasses: toRef(() => `v-locale--is-${isRtl.value ? 'rtl' : 'ltr'}`),
}
}
export function useRtl () {
const locale = inject(LocaleSymbol)
if (!locale) throw new Error('[Vuetify] Could not find injected rtl instance')
return { isRtl: locale.isRtl, rtlClasses: locale.rtlClasses }
}
View on GitHub (pinned to 8d153908df)
Solutions
- Install Vuetify with app.use(createVuetify()) before mounting.
- Register Vuetify on each app instance that uses its components.
- Add createVuetify() to test app setup.
Example fix
// before
const app = createApp(App)
app.mount('#app')
// after
const app = createApp(App)
app.use(createVuetify())
app.mount('#app') Defensive patterns
Strategy: validation
Validate before calling
import { inject } from 'vue'
import { LocaleSymbol } from 'vuetify'
const locale = inject(LocaleSymbol, null)
if (!locale) {
// Vuetify not installed: cannot read RTL; default to LTR or fail loudly.
} Type guard
import { inject } from 'vue'
import { LocaleSymbol } from 'vuetify'
export function hasRtl (): boolean {
return inject(LocaleSymbol, null) != null
} Prevention
- Install createVuetify() at bootstrap.
- Register Vuetify in every app instance.
- Add the plugin to test mounts.
When it happens
Trigger: Calling useRtl() (directly, or via a component that reads RTL such as <v-locale> or slider/window internals) when app.use(createVuetify()) was never called.
Common situations: Missing Vuetify plugin install; component rendered in an app instance without Vuetify; SSR or test mount without createVuetify().
Related errors
- [Vuetify] Could not find injected locale instance
- Could not find Vuetify theme injection
- Missing Vuetify Icons provide!
- foo
- Missing group!
AI-assisted analysis of vuetifyjs/vuetify@8d153908df (2026-08-12).
Data as JSON: /api/errors/880865871c0774b6.
Report an issue: GitHub.