{"record":{"id":"cbc240cb5aa3b0ea","repo":"vuetifyjs/vuetify","slug":"vuetify-could-not-find-injected-goto-instance","errorCode":null,"errorMessage":"[Vuetify] Could not find injected goto instance","messagePattern":"\\[Vuetify\\] Could not find injected goto instance","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vuetify/src/composables/goto.ts","lineNumber":141,"sourceCode":"\n    // Allow for some jitter if target time has elapsed\n    if (progress >= 1 && Math.abs(location - container[property]) < 10) {\n      return resolve(targetLocation)\n    } else if (progress > 2) {\n      // The target might not be reachable\n      consoleWarn('Scroll target is not reachable')\n      return resolve(container[property])\n    }\n\n    requestAnimationFrame(step)\n  }))\n}\n\nexport function useGoTo (_options: GoToOptions = {}) {\n  const goToInstance = inject(GoToSymbol)\n  const { isRtl } = useRtl()\n\n  if (!goToInstance) throw new Error('[Vuetify] Could not find injected goto instance')\n\n  const goTo = {\n    ...goToInstance,\n    // can be set via VLocaleProvider\n    rtl: toRef(() => goToInstance.rtl.value || isRtl.value),\n  }\n\n  async function go (\n    target: ComponentPublicInstance | HTMLElement | string | number,\n    options?: Partial<GoToOptions>,\n  ) {\n    return scrollTo(target, mergeDeep(_options, options), false, goTo)\n  }\n\n  go.horizontal = async (\n    target: ComponentPublicInstance | HTMLElement | string | number,\n    options?: Partial<GoToOptions>,\n  ) => {","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/vuetifyjs/vuetify/blob/8d153908dffb7592eb389ddbfbab955a0ccc977f/packages/vuetify/src/composables/goto.ts#L123-L159","documentation":"Thrown by useGoTo() when inject(GoToSymbol) is undefined. The goto/scroll instance is created and provided by createVuetify() (via the `goTo` config). Without the Vuetify plugin installed, no goto instance exists to inject.","triggerScenarios":"Calling useGoTo() in an app where createVuetify() was never installed, or in a component mounted outside the Vuetify-providing app root.","commonSituations":"Forgetting app.use(vuetify), separate createApp instances without Vuetify, SSR misconfiguration, or duplicate installs breaking symbol identity.","solutions":["Install Vuetify: `app.use(createVuetify())`.","Ensure components using useGoTo() are under the Vuetify app root.","For sub-apps, install Vuetify on each createApp that needs goto."],"exampleFix":"// before\ncreateApp(App).mount('#app')\n\n// after\nimport { createVuetify } from 'vuetify'\ncreateApp(App).use(createVuetify()).mount('#app')","handlingStrategy":"type-guard","validationCode":"import { inject } from 'vue'\nimport { GoToSymbol } from 'vuetify/composables/goto'\nfunction gotoInstalled(): boolean {\n  return inject(GoToSymbol, null) != null\n}","typeGuard":"import { inject } from 'vue'\nimport { GoToSymbol } from 'vuetify/composables/goto'\nfunction hasGoToProvider(): boolean {\n  return inject(GoToSymbol, null) != null\n}","tryCatchPattern":"try {\n  useGoTo()\n} catch (e) {\n  if (e instanceof Error && /Could not find injected goto instance/.test(e.message)) {\n    // install Vuetify, or fall back to native el.scrollIntoView()\n  } else throw e\n}","preventionTips":["Always app.use(createVuetify()) before using useGoTo().","Install Vuetify on every sub-app that needs goto.","Avoid duplicate installs."],"tags":["vuetify","goto","injection","setup"],"backgroundTag":null,"analyzedSha":"8d153908dffb7592eb389ddbfbab955a0ccc977f","analyzedAt":"2026-08-12T21:54:20.596Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}