{"record":{"id":"e91a5788f6c8cb8c","repo":"vuejs/devtools-v6","slug":"vue-devtools-vue-version-not-found","errorCode":null,"errorMessage":"[Vue Devtools] Vue version not found","messagePattern":"\\[Vue Devtools\\] Vue version not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/app-backend-core/src/app.ts","lineNumber":36,"sourceCode":"const jobs = new JobQueue()\n\nlet recordId = 0\n\ntype AppRecordResolver = (record: AppRecord) => void | Promise<void>\nconst appRecordPromises = new Map<App, AppRecordResolver[]>()\n\nexport async function registerApp(options: AppRecordOptions, ctx: BackendContext) {\n  return jobs.queue('regiserApp', () => registerAppJob(options, ctx))\n}\n\nasync function registerAppJob(options: AppRecordOptions, ctx: BackendContext) {\n  // Dedupe\n  if (ctx.appRecords.find(a => a.options.app === options.app)) {\n    return\n  }\n\n  if (!options.version) {\n    throw new Error('[Vue Devtools] Vue version not found')\n  }\n\n  // Find correct backend\n  const baseFrameworkVersion = Number.parseInt(options.version.substring(0, options.version.indexOf('.')))\n  for (let i = 0; i < availableBackends.length; i++) {\n    const backendOptions = availableBackends[i]\n    if (backendOptions.frameworkVersion === baseFrameworkVersion) {\n      // Enable backend if it's not enabled\n      const backend = getBackend(backendOptions, ctx)\n\n      await createAppRecord(options, backend, ctx)\n\n      break\n    }\n  }\n}\n\nasync function createAppRecord(options: AppRecordOptions, backend: DevtoolsBackend, ctx: BackendContext) {","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/vuejs/devtools-v6/blob/dd2ab5d4275187cbd81952a2a3d53c335643c1f4/packages/app-backend-core/src/app.ts#L18-L54","documentation":"registerDevToolsApp/registerAppJob requires the app's Vue version string to select the correct backend (Vue 2 vs Vue 3) by parsing the major version. If options.version is empty or undefined, it throws instead of guessing a backend. This guards against registering an app whose version could not be detected.","triggerScenarios":"Calling app-backend registerApp (via the registerAppJob path) with an AppOptions object whose `version` field is undefined, null, or an empty string — typically because the backend sent `hook.Vue` / `app.version` before Vue exposed it.","commonSituations":"Custom app integrations calling the devtools API manually without passing version; apps using exotic Vue builds where `Vue.version` is missing; timing issues where registration happens before the framework sets its version; third-party framework wrappers that report no version.","solutions":["Pass an explicit version when registering: include `version: Vue.version` (e.g. '3.4.21') in the options object.","Verify the app actually exposes Vue.version before registration; if using a bundled/aliased Vue import, import from the real 'vue' package to get the version.","If writing a custom backend integration, guard the call: only call registerApp once a version string is available, or default to a known major like '3.0.0'.","Update vue-devtools packages to the latest version — newer detectors handle more framework builds."],"exampleFix":"// before\nregisterDevToolsApi({ app, appId, options: { app } }) // no version\n\n// after\nimport Vue from 'vue'\nregisterDevToolsApi({ app, appId, options: { app, version: Vue.version } })","handlingStrategy":"validation","validationCode":"const version = options.version ?? Vue.version\nif (typeof version !== 'string' || !/^\\d+\\./.test(version)) {\n  throw new Error(`registerApp requires a valid version string, got: ${version}`)\n}\nregisterDevToolsApi({ ...options, version })","typeGuard":"function hasVersion(o) { return typeof o?.version === 'string' && o.version.length > 0 }","tryCatchPattern":null,"preventionTips":["Always pass Vue.version explicitly when registering an app programmatically","Avoid registering before the framework has fully loaded","Add a startup assertion that version exists in your devtools integration code"],"tags":["vue-devtools","registration","missing-version","configuration"],"backgroundTag":"missing-required-option","analyzedSha":"dd2ab5d4275187cbd81952a2a3d53c335643c1f4","analyzedAt":"2026-08-31T12:41:59.822Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}