{"record":{"id":"ff8779a77acd3773","repo":"vuejs/vue-router","slug":"failed-to-resolve-async-component-key-reason","errorCode":null,"errorMessage":"Failed to resolve async component ${key}: ${reason}","messagePattern":"Failed to resolve async component (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/util/resolve-components.js","lineNumber":40,"sourceCode":"\n        const resolve = once(resolvedDef => {\n          if (isESModule(resolvedDef)) {\n            resolvedDef = resolvedDef.default\n          }\n          // save resolved on async factory in case it's used elsewhere\n          def.resolved = typeof resolvedDef === 'function'\n            ? resolvedDef\n            : _Vue.extend(resolvedDef)\n          match.components[key] = resolvedDef\n          pending--\n          if (pending <= 0) {\n            next()\n          }\n        })\n\n        const reject = once(reason => {\n          const msg = `Failed to resolve async component ${key}: ${reason}`\n          process.env.NODE_ENV !== 'production' && warn(false, msg)\n          if (!error) {\n            error = isError(reason)\n              ? reason\n              : new Error(msg)\n            next(error)\n          }\n        })\n\n        let res\n        try {\n          res = def(resolve, reject)\n        } catch (e) {\n          reject(e)\n        }\n        if (res) {\n          if (typeof res.then === 'function') {\n            res.then(resolve, reject)\n          } else {","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/vuejs/vue-router/blob/680ccc68c506cca9be6207745043245d61fa715a/src/util/resolve-components.js#L22-L58","documentation":"This is a dev-only warn (console.warn) shown when <router-link> is used with a scoped slot (v-slot) but without the custom prop. In Vue Router 4 the default anchor rendering will change for slot content, so the library warns you to opt in with custom to take full control of the rendered element. It fires once per session (warnedCustomSlot flag).","triggerScenarios":"Rendering <router-link v-slot=\"{ href, navigate }\">...</router-link> in dev mode without the custom prop, while also using the default rendering path (i.e. relying on router-link to render the <a> itself).","commonSituations":"Migrating from vue-router 3 to 4 or using next releases; copying v-slot examples that assume custom; fully custom link components (e.g. wrapping <nuxt-link>-style markup) that forget custom.","solutions":["Add the custom prop to <router-link> when using v-slot and render your own <a>.","If you want the default <a> rendering, drop the scoped slot and use the default slot instead.","Suppress by acknowledging the future behavior change if it is intentional (warning is dev-only, once)."],"exampleFix":"// before\n<router-link v-slot=\"{ href, navigate }\"><a :href=\"href\" @click=\"navigate\">Go</a></router-link>\n// after\n<router-link :to=\"to\" custom v-slot=\"{ href, navigate }\"><a :href=\"href\" @click=\"navigate\">Go</a></router-link>","handlingStrategy":"retry","validationCode":"// preflight: ensure the chunk URL is reachable before navigating\nasync function chunkReachable (importFn) {\n  try { await importFn(); return true } catch { return false }\n}","typeGuard":"function isChunkError (err) {\n  return err instanceof Error && /Loading chunk|Loading CSS chunk|ChunkLoadError/i.test(err.message)\n}","tryCatchPattern":"function lazy (importFn, retries = 2) {\n  return () => importFn().catch(err => {\n    if (retries-- > 0 && isChunkError(err)) {\n      window.location.reload()\n    }\n    throw err\n  })\n}\n{ path: '/admin', component: lazy(() => import('@/views/Admin')) }","preventionTips":["Keep deploy artifact hashes stable per release; consider caching-busting strategies for long-lived sessions.","Handle Vue async component error/timeout options where applicable.","Verify dynamic import paths resolve at build time (bundler warnings).","Monitor for ChunkLoadError in production error tracking."],"tags":["vue-router","router-link","deprecation","migration","vue-router-4"],"backgroundTag":"router-link-v-slot-custom-warning","analyzedSha":"680ccc68c506cca9be6207745043245d61fa715a","analyzedAt":"2026-09-02T19:19:01.204Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}