選項
首頁首頁 Skill 網頁開發 vue-debug-guides

vue-debug-guides

vuejs-ai/skills vuejs-ai/skills

透過針對性的除錯指南,診斷並解決 Vue 3 的執行時錯誤、警告、非同步失敗,以及 SSR/資料注入問題。

...展開全部
0
更新時間 2026-09-28

Vue 3 的除錯與錯誤處理,適用於執行時問題、警告、非同步失敗及資料綁定錯誤。 有關開發最佳實務與常見陷阱,請參閱vue-best-practices。

反應性

  • 追蹤意外的重新渲染與狀態更新 → 請參閱 reactivity-debugging-hooks
  • 因缺少 .value 存取而導致 ref 值未更新 → 參閱 ref-value-access
  • 解構反應式物件後狀態停止更新 → 請參閱 reactive-destructuring
  • 陣列、Map 或 Set 內的 ref 未被解包 → 請參閱 refs-in-collections-need-value
  • 嵌套的 ref 在模板中渲染為 [object Object] → 參見 template-ref-unwrapping-top-level
  • 反應式代理的同一性比對總是返回 false → 參閱 reactivity-proxy-identity-hazard
  • 第三方實例在代理後發生故障 → 請參閱 reactivity-markraw-for-non-reactive
  • 觀察者每幀僅觸發一次,與預期不符 → 請參閱 reactivity-same-tick-batching

計算

  • 計算屬性的 getter 意外觸發變異或請求 → 參見 computed-no-side-effects
  • 修改計算值會導致變更消失 → 參見 computed-return-value-readonly
  • 計算值在條件邏輯執行後從未更新 → 參見 computed-conditional-dependencies
  • 對陣列進行排序或反轉會破壞原始狀態 → 參閱 computed-array-mutation
  • 將參數傳遞給計算屬性時失敗 → 請參閱 computed-no-parameters

觀察者

  • 非同步操作以過期資料覆寫 → 參見 watch-async-cleanup
  • 在非同步回呼中建立觀察者 → 參見 watch-async-creation-memory-leak
  • 觀察者從未針對反應式物件屬性觸發 → 參見 watch-reactive-property-getter
  • 非同步 watchEffect 在 `await` 之後遺漏依賴項 → 參見 watcheffect-async-dependency-tracking
  • 觀察器回呼內部的 DOM 讀取資料已過期 → 參見 watch-flush-timing
  • 深度觀察者回報相同的舊值與新值 → 參閱 watch-deep-same-object-reference
  • watchEffect 在模板引用更新前即執行 → 參見 watcheffect-flush-post-for-refs

元件

  • 子元件拋出「找不到元件」錯誤 → 參見 local-components-not-in-descendants
  • 自訂元件上的點擊監聽器未觸發 → 參見 click-events-on-components
  • 父元件無法在腳本設定中存取子元件的 ref 資料 → 參見 component-ref-requires-defineexpose
  • HTML 模板解析破壞了 Vue 元件的語法 → 參見 in-dom-template-parsing-caveats
  • 因名稱衝突導致渲染錯誤的元件 → 參見 component-naming-conflicts
  • 父元件的樣式不套用至多根元件 → 參閱 multi-root-component-class-attrs

Props 與 Emits

  • 在 `defineProps` 中引用的變數會導致錯誤 → 參見 prop-defineprops-scope-limitation
  • 元件發送未宣告的事件,導致警告 → 參見 declare-emits-for-documentation
  • 在函式或條件語句中使用 `defineEmits` → 參閱 `defineEmits-must-be-top-level`
  • defineEmits 同時包含類型參數與執行時參數 → 參見 defineEmits-no-runtime-and-type-mixed
  • 原生事件監聽器未對點擊做出反應 → 參閱 native-event-collision-with-emits
  • 點擊時元件事件觸發兩次 → 參見 undeclared-emits-double-firing

範本

  • 包含陳述式時出現模板編譯錯誤 → 參見 template-expressions-restrictions
  • 「無法讀取未定義物件的屬性」執行時錯誤 → 請參閱 v-if-null-check-order
  • 動態指令參數無法正常運作 → 參見 dynamic-argument-constraints
  • v-else 元素總是無條件渲染 → 參見 v-else-must-follow-v-if
  • 將 v-if 與 v-for 混合使用會導致優先級錯誤及遷移失敗 → 請參閱 no-v-if-with-v-for
  • 模板函式呼叫會變更狀態,導致無法預測的重渲染錯誤 → 參見 template-functions-no-side-effects
  • 迴圈中的子元件顯示未定義的資料 → 參見 v-for-component-props
  • 陣列順序在排序或反轉後發生變化 → 參見 v-for-computed-reverse-sort
  • 清單項目意外消失或狀態發生交換 → 參見 v-for-key-attribute
  • 範圍迭代時發生「偏移一」錯誤 → 參見 v-for-range-starts-at-one
  • v-show 或 v-else 在模板元素上無法正常運作 → 請參閱 v-show-template-limitation

模板引用

  • 當元素被條件性隱藏時,Ref 會變成 null → 請參閱 template-ref-null-with-v-if
  • 迴圈中 Ref 陣列索引與資料陣列不匹配 → 請參閱 template-ref-v-for-order
  • 重構模板引用名稱會導致程式碼靜默失效 → 參見 use-template-ref-vue35

表單與 v-model

  • 使用 v-model 時,表單的初始值未顯示 → 參見 v-model-ignores-html-attributes
  • textarea 內容變更後未更新 ref → 參見 textarea-no-interpolation
  • iOS 使用者無法選取下拉選單的首個選項 → 參見 select-initial-value-ios-bug
  • 父組件與子組件的值不一致 → 參見 define-model-default-value-sync
  • 物件屬性變更未同步至父元件 → 參閱 definemodel-object-mutation-no-emit
  • 中文/日文輸入時,即時搜尋/驗證功能失效 → 參見 v-model-ime-composition
  • 數字輸入欄位返回空字串而非零 → 參見 v-model-number-modifier-behavior
  • 自訂核取方塊的值未在表單中提交 → 參見 checkbox-true-false-value-form-submission

事件與修飾器

  • 串接多個事件修飾子會產生意外結果 → 請參閱 event-modifier-order-matters
  • 鍵盤快捷鍵在搭配系統修飾鍵時無法觸發 → 參見 keyup-modifier-timing
  • 鍵盤快捷鍵會與非預期的修飾鍵組合觸發 → 參閱 exact-modifier-for-precise-shortcuts
  • 同時使用「被動」與「防止」修飾符會破壞事件行為 → 參見 no-passive-with-prevent

生命週期

  • 未移除的事件監聽器會導致記憶體洩漏 → 請參閱 cleanup-side-effects
  • 在元件掛載前存取 DOM 會失敗 → 參閱 lifecycle-dom-access-timing
  • 狀態變更後,DOM 讀取會返回過期的值 → 參閱 dom-update-timing-nexttick
  • 伺服器端渲染 (SSR) 與客戶端初始化 (hydration) 存在差異 → 參見 lifecycle-ssr-awareness
  • 以非同步方式註冊的生命週期鉤子永遠不會執行 → 參見 lifecycle-hooks-synchronous-registration

插槽

  • 在插槽內容中存取子元件資料會返回未定義值 → 參見 slot-render-scope-parent-only
  • 將命名槽與作用域槽混合使用會導致編譯錯誤 → 參見 slot-named-scoped-explicit-default
  • 在原生 HTML 元素上使用 v-slot 會導致編譯錯誤 → 參見 slot-v-slot-on-components-or-templates-only
  • 因隱含預設插槽行為導致內容位置異常 → 參見 slot-implicit-default-content
  • 作用域槽的 props 缺少預期的 name 屬性 → 參見 slot-name-reserved-prop
  • 封裝元件破壞子元件的插槽功能 → 參見 slot-forwarding-to-child-components

Provide/Inject

  • 在非同步操作後呼叫 `provide` 會無聲失敗 → 參見 `provide-inject-synchronous-setup`
  • 追蹤提供值的來源 → 參見 provide-inject-debugging-challenges
  • 當提供者變更時,注入的值未隨之更新 → 參見 provide-inject-reactivity-not-automatic
  • 多個元件共用同一個預設物件 → 參見 provide-inject-default-value-factory

屬性

  • 內部與 fallthrough 事件處理常式皆會執行 → 參見 attrs-event-listener-merging
  • 顯式屬性被 fallthrough 值覆寫 → 參見 fallthrough-attrs-overwrite-vue3
  • 屬性在封裝元件中套用至錯誤的元素 → 參見 inheritattrs-false-for-wrapper-components

可組合元件

  • 在 setup 上下文之外或以非同步方式呼叫 Composable → 請參閱 composable-call-location-restrictions
  • 當輸入變更時,可組合元件的反應式依賴項未更新 → 請參閱 composable-tovalue-inside-watcheffect
  • 可組合元件意外地修改外部狀態 → 參見 composable-avoid-hidden-side-effects
  • 解構可組合元件的回傳值會意外破壞反應性 → 請參閱 composable-naming-return-pattern

組合 API

  • 異步操作後生命週期鉤子無聲失敗 → 參見 composition-api-script-setup-async-context
  • 父元件的 ref 無法存取已公開的屬性 → 參見 define-expose-before-await
  • 函式式程式設計模式會破壞預期的 Vue 反應性行為 → 參見 composition-api-not-functional-programming
  • React Hook 的思維模式導致 Composition API 使用不當 → 參見 composition-api-vs-react-hooks-differences

動畫

  • 當 DOM 節點被重複使用時,動畫無法觸發 → 請參閱 animation-key-for-rerender
  • 在高負載下,TransitionGroup 清單的更新感覺有延遲 → 參見 animation-transitiongroup-performance

TypeScript

  • 可變屬性的預設值會導致元件實例之間發生狀態洩漏 → 參見 ts-withdefaults-mutable-factory-function
  • reactive() 的泛型定義會導致 ref 解包不匹配 → 參見 ts-reactive-no-generic-argument
  • 在掛載前或 v-if 移除後,模板引用會拋出 null 存取錯誤 → 參見 ts-template-ref-null-handling
  • 可選的布林屬性預設值為 `false` 而非 `undefined` → 詳見 ts-defineprops-boolean-default-false
  • 導入的 defineProps 類型因無法解析或複雜的類型引用而失敗 → 參見 ts-defineprops-imported-types-limitations
  • 在嚴格的 TypeScript 設定下,未指定類型的 DOM 事件處理程序會失敗 → 參見 ts-event-handler-explicit-typing
  • 動態元件引用會觸發反應式元件警告 → 參見 ts-shallowref-for-dynamic-components
  • 未進行型別窄化的聯合型別模板表達式會導致型別檢查失敗 → 參閱 ts-template-type-casting

非同步元件

  • 使用 `defineAsyncComponent` 懶加載配置路由元件時設定錯誤 → 請參閱 async-component-vue-router
  • 載入元件時發生網路錯誤或超時 → 參閱 async-component-error-handling
  • 元件重新啟動後,模板引用未定義 → 參閱 async-component-keepalive-ref-issue

渲染函式

  • 狀態變更後,渲染函式輸出保持不變 → 請參閱 rendering-render-function-return-from-setup
  • 重複使用的 vnode 實例渲染不正確 → 請參閱 render-function-vnodes-must-be-unique
  • 字串組件名稱渲染為 HTML 元素 → 請參閱 rendering-resolve-component-for-string-names
  • 在 Vue 更新時存取 vnode 內部屬性會導致錯誤 → 參見 render-function-avoid-internal-vnode-properties
  • Vue 2 的渲染函式模式在 Vue 3 中會導致當機 → 參見 rendering-render-function-h-import-vue3
  • h() 中的插槽內容未渲染 → 參見 rendering-render-function-slots-as-functions

KeepAlive

  • 在嵌套的 Vue Router 路由中,子元件會被掛載兩次 → 參見 keepalive-router-nested-double-mount
  • 將 KeepAlive 與 Transition 動畫結合時記憶體會增加 → 參見 keepalive-transition-memory-leak

過渡

  • 若未設定 done 回調函式,JavaScript 轉場鉤子會陷入阻塞 → 參見 transition-js-hooks-done-callback
  • 內嵌清單元素的移動動畫失敗 → 參見 transition-group-flip-inline-elements
  • 清單項目會跳躍而非平滑動畫 → 參見 transition-group-move-animation-position-absolute
  • Vue 2 至 Vue 3 的 TransitionGroup 封裝器變更導致版面配置異常 → 參見 transition-group-no-default-wrapper-vue3
  • 嵌套轉場在完成前即被中斷 → 參見 transition-nested-duration
  • 在可重複使用的過渡封裝器中,範圍限定樣式停止生效 → 參見 transition-reusable-scoped-style
  • RouterView 過渡效果在首次渲染時會出現意外動畫 → 參見 transition-router-view-appear
  • 混合使用 CSS 過渡與動畫會導致時序問題 → 參見 transition-type-when-mixed
  • 快速切換過渡時遺漏清理鉤子 → 參見 transition-unmount-hook-timing

Teleport

  • DOM 中找不到 Teleport 的目標元素 → 參見 teleport-target-must-exist
  • 傳送的內容破壞了 SSR 內容載入 → 參見 teleport-ssr-hydration
  • 作用域樣式未套用至傳送的內容 → 參見 teleport-scoped-styles-limitation

Suspense

  • 需處理來自 Suspense 元件的非同步錯誤 → 請參閱 suspense-no-builtin-error-handling
  • 在伺服器端渲染中使用 Suspense → 參見 suspense-ssr-hydration-issues
  • 在 Suspense 環境下,非同步元件載入/錯誤的 UI 被忽略 → 參見 async-component-suspense-control

SSR

  • 伺服器端與客戶端渲染的 HTML 內容不一致 → 請參閱 ssr-hydration-mismatch-causes
  • 使用者狀態從共用單例儲存區在請求之間洩漏 → 請參閱 state-ssr-cross-request-pollution
  • 僅限瀏覽器的 API 會導致通用程式碼路徑中的伺服器端渲染崩潰 → 參見 ssr-platform-specific-apis

效能

  • 由於父元件傳遞不穩定的 props,導致子元件不必要地重新渲染 → 參見 perf-props-stability-update-optimization
  • 即使值相同,計算物件仍會重新觸發效果 → 參見 perf-computed-object-stability

SFC(單檔元件)

  • 嘗試在元件腳本區塊中使用命名導出 → 參見 sfc-named-exports-forbidden
  • 變數在變更後未於模板中更新 → 參見 sfc-script-setup-reactivity
  • 作用域內樣式未套用至子元件元素 → 參見 sfc-scoped-css-child-component-styling
  • 作用域樣式無法套用至動態 v-html 內容 → 參見 sfc-scoped-css-dynamic-content
  • 作用域樣式未套用至插槽內容 → 參閱 sfc-scoped-css-slot-content
  • 動態建構時缺少 Tailwind 類別 → 請參閱 tailwind-dynamic-class-generation
  • 因名稱衝突導致遞迴元件無法渲染 → 請參閱 self-referencing-component-name

外掛程式

  • 除錯:為何全域屬性會導致命名衝突 → 參閱 plugin-global-properties-sparingly
  • 外掛程式無法運作或注入結果為 `undefined` → 請參閱 plugin-install-before-mount
  • 在基於 setup 的元件中無法使用外掛程式全域屬性 → 請參閱 plugin-prefer-provide-inject-over-global-properties
  • 外掛程式類型擴充錯誤導致 ComponentCustomProperties 類型定義失效 → 參見 plugin-typescript-type-augmentation

應用程式設定

  • 在呼叫 `mount` 之後,應用程式設定方法無法運作 → 請參閱 configure-app-before-mount
  • 在 `mount()` 之後鏈接應用程式設定會失敗,因為 `mount` 會傳回元件實例 → 請參閱 mount-return-value
  • 在 Vite 中,基於 require.context 的元件自動註冊失敗 → 參見 dynamic-component-registration-vite
在 GitHub 上查看
---
name: vue-debug-guides
description: Diagnose and fix Vue 3 runtime errors, warnings, async failures, and SSR/hydration issues with targeted debugging guides.
---

Vue 3 debugging and error handling for runtime issues, warnings, async failures, and hydration bugs.
For development best practices and common gotchas, use `vue-best-practices`.

### Reactivity
- Tracing unexpected re-renders and state updates → See [reactivity-debugging-hooks](reference/reactivity-debugging-hooks.md)
- Ref values not updating due to missing .value access → See [ref-value-access](reference/ref-value-access.md)
- State stops updating after destructuring reactive objects → See [reactive-destructuring](reference/reactive-destructuring.md)
- Refs inside arrays, Maps, or Sets not unwrapping → See [refs-in-collections-need-value](reference/refs-in-collections-need-value.md)
- Nested refs rendering as [object Object] in templates → See [template-ref-unwrapping-top-level](reference/template-ref-unwrapping-top-level.md)
- Reactive proxy identity comparisons always return false → See [reactivity-proxy-identity-hazard](reference/reactivity-proxy-identity-hazard.md)
- Third-party instances breaking when proxied → See [reactivity-markraw-for-non-reactive](reference/reactivity-markraw-for-non-reactive.md)
- Watchers only firing once per tick unexpectedly → See [reactivity-same-tick-batching](reference/reactivity-same-tick-batching.md)

### Computed
- Computed getter triggers mutations or requests unexpectedly → See [computed-no-side-effects](reference/computed-no-side-effects.md)
- Mutating computed values causes changes to disappear → See [computed-return-value-readonly](reference/computed-return-value-readonly.md)
- Computed value never updates after conditional logic → See [computed-conditional-dependencies](reference/computed-conditional-dependencies.md)
- Sorting or reversing arrays breaks original state → See [computed-array-mutation](reference/computed-array-mutation.md)
- Passing parameters to computed properties fails → See [computed-no-parameters](reference/computed-no-parameters.md)

### Watchers
- Async operations overwriting with stale data → See [watch-async-cleanup](reference/watch-async-cleanup.md)
- Creating watchers inside async callbacks → See [watch-async-creation-memory-leak](reference/watch-async-creation-memory-leak.md)
- Watcher never triggers for reactive object properties → See [watch-reactive-property-getter](reference/watch-reactive-property-getter.md)
- Async watchEffect misses dependencies after await → See [watcheffect-async-dependency-tracking](reference/watcheffect-async-dependency-tracking.md)
- DOM reads are stale inside watcher callbacks → See [watch-flush-timing](reference/watch-flush-timing.md)
- Deep watchers report identical old/new values → See [watch-deep-same-object-reference](reference/watch-deep-same-object-reference.md)
- watchEffect runs before template refs update → See [watcheffect-flush-post-for-refs](reference/watcheffect-flush-post-for-refs.md)

### Components
- Child component throws "component not found" error → See [local-components-not-in-descendants](reference/local-components-not-in-descendants.md)
- Click listener doesn't fire on custom component → See [click-events-on-components](reference/click-events-on-components.md)
- Parent can't access child ref data in script setup → See [component-ref-requires-defineexpose](reference/component-ref-requires-defineexpose.md)
- HTML template parsing breaks Vue component syntax → See [in-dom-template-parsing-caveats](reference/in-dom-template-parsing-caveats.md)
- Wrong component renders due to naming collisions → See [component-naming-conflicts](reference/component-naming-conflicts.md)
- Parent styles don't apply to multi-root component → See [multi-root-component-class-attrs](reference/multi-root-component-class-attrs.md)

### Props & Emits
- Variables referenced in defineProps cause errors → See [prop-defineprops-scope-limitation](reference/prop-defineprops-scope-limitation.md)
- Component emits undeclared event causing warnings → See [declare-emits-for-documentation](reference/declare-emits-for-documentation.md)
- defineEmits used inside function or conditional → See [defineEmits-must-be-top-level](reference/defineEmits-must-be-top-level.md)
- defineEmits has both type and runtime arguments → See [defineEmits-no-runtime-and-type-mixed](reference/defineEmits-no-runtime-and-type-mixed.md)
- Native event listeners not responding to clicks → See [native-event-collision-with-emits](reference/native-event-collision-with-emits.md)
- Component event fires twice when clicking → See [undeclared-emits-double-firing](reference/undeclared-emits-double-firing.md)

### Templates
- Getting template compilation errors with statements → See [template-expressions-restrictions](reference/template-expressions-restrictions.md)
- "Cannot read property of undefined" runtime errors → See [v-if-null-check-order](reference/v-if-null-check-order.md)
- Dynamic directive arguments not working properly → See [dynamic-argument-constraints](reference/dynamic-argument-constraints.md)
- v-else elements rendering unconditionally always → See [v-else-must-follow-v-if](reference/v-else-must-follow-v-if.md)
- Mixing v-if with v-for causes precedence bugs and migration breakage → See [no-v-if-with-v-for](reference/no-v-if-with-v-for.md)
- Template function calls mutating state cause unpredictable re-render bugs → See [template-functions-no-side-effects](reference/template-functions-no-side-effects.md)
- Child components in loops showing undefined data → See [v-for-component-props](reference/v-for-component-props.md)
- Array order changing after sorting or reversing → See [v-for-computed-reverse-sort](reference/v-for-computed-reverse-sort.md)
- List items disappearing or swapping state unexpectedly → See [v-for-key-attribute](reference/v-for-key-attribute.md)
- Getting off-by-one errors with range iteration → See [v-for-range-starts-at-one](reference/v-for-range-starts-at-one.md)
- v-show or v-else not working on template elements → See [v-show-template-limitation](reference/v-show-template-limitation.md)

### Template Refs
- Ref becomes null when element is conditionally hidden → See [template-ref-null-with-v-if](reference/template-ref-null-with-v-if.md)
- Ref array indices don't match data array in loops → See [template-ref-v-for-order](reference/template-ref-v-for-order.md)
- Refactoring template ref names breaks silently in code → See [use-template-ref-vue35](reference/use-template-ref-vue35.md)

### Forms & v-model
- Initial form values not showing when using v-model → See [v-model-ignores-html-attributes](reference/v-model-ignores-html-attributes.md)
- Textarea content changes not updating the ref → See [textarea-no-interpolation](reference/textarea-no-interpolation.md)
- iOS users cannot select dropdown first option → See [select-initial-value-ios-bug](reference/select-initial-value-ios-bug.md)
- Parent and child components have different values → See [define-model-default-value-sync](reference/define-model-default-value-sync.md)
- Object property changes not syncing to parent → See [definemodel-object-mutation-no-emit](reference/definemodel-object-mutation-no-emit.md)
- Real-time search/validation broken for Chinese/Japanese input → See [v-model-ime-composition](reference/v-model-ime-composition.md)
- Number input returns empty string instead of zero → See [v-model-number-modifier-behavior](reference/v-model-number-modifier-behavior.md)
- Custom checkbox values not submitted in forms → See [checkbox-true-false-value-form-submission](reference/checkbox-true-false-value-form-submission.md)

### Events & Modifiers
- Chaining multiple event modifiers produces unexpected results → See [event-modifier-order-matters](reference/event-modifier-order-matters.md)
- Keyboard shortcuts don't fire with system modifier keys → See [keyup-modifier-timing](reference/keyup-modifier-timing.md)
- Keyboard shortcuts fire with unintended modifier combinations → See [exact-modifier-for-precise-shortcuts](reference/exact-modifier-for-precise-shortcuts.md)
- Combining passive and prevent modifiers breaks event behavior → See [no-passive-with-prevent](reference/no-passive-with-prevent.md)

### Lifecycle
- Memory leaks from unremoved event listeners → See [cleanup-side-effects](reference/cleanup-side-effects.md)
- DOM access fails before component mounts → See [lifecycle-dom-access-timing](reference/lifecycle-dom-access-timing.md)
- DOM reads return stale values after state changes → See [dom-update-timing-nexttick](reference/dom-update-timing-nexttick.md)
- SSR rendering differs from client hydration → See [lifecycle-ssr-awareness](reference/lifecycle-ssr-awareness.md)
- Lifecycle hooks registered asynchronously never run → See [lifecycle-hooks-synchronous-registration](reference/lifecycle-hooks-synchronous-registration.md)

### Slots
- Accessing child component data in slot content returns undefined values → See [slot-render-scope-parent-only](reference/slot-render-scope-parent-only.md)
- Mixing named and scoped slots together causes compilation errors → See [slot-named-scoped-explicit-default](reference/slot-named-scoped-explicit-default.md)
- Using v-slot on native HTML elements causes compilation errors → See [slot-v-slot-on-components-or-templates-only](reference/slot-v-slot-on-components-or-templates-only.md)
- Unexpected content placement from implicit default slot behavior → See [slot-implicit-default-content](reference/slot-implicit-default-content.md)
- Scoped slot props missing expected name property → See [slot-name-reserved-prop](reference/slot-name-reserved-prop.md)
- Wrapper components breaking child slot functionality → See [slot-forwarding-to-child-components](reference/slot-forwarding-to-child-components.md)

### Provide/Inject
- Calling provide after async operations fails silently → See [provide-inject-synchronous-setup](reference/provide-inject-synchronous-setup.md)
- Tracing where provided values come from → See [provide-inject-debugging-challenges](reference/provide-inject-debugging-challenges.md)
- Injected values not updating when provider changes → See [provide-inject-reactivity-not-automatic](reference/provide-inject-reactivity-not-automatic.md)
- Multiple components share same default object → See [provide-inject-default-value-factory](reference/provide-inject-default-value-factory.md)

### Attrs
- Both internal and fallthrough event handlers execute → See [attrs-event-listener-merging](reference/attrs-event-listener-merging.md)
- Explicit attributes overwritten by fallthrough values → See [fallthrough-attrs-overwrite-vue3](reference/fallthrough-attrs-overwrite-vue3.md)
- Attributes applying to wrong element in wrappers → See [inheritattrs-false-for-wrapper-components](reference/inheritattrs-false-for-wrapper-components.md)

### Composables
- Composable called outside setup context or asynchronously → See [composable-call-location-restrictions](reference/composable-call-location-restrictions.md)
- Composable reactive dependency not updating when input changes → See [composable-tovalue-inside-watcheffect](reference/composable-tovalue-inside-watcheffect.md)
- Composable mutates external state unexpectedly → See [composable-avoid-hidden-side-effects](reference/composable-avoid-hidden-side-effects.md)
- Destructuring composable returns breaks reactivity unexpectedly → See [composable-naming-return-pattern](reference/composable-naming-return-pattern.md)

### Composition API
- Lifecycle hooks failing silently after async operations → See [composition-api-script-setup-async-context](reference/composition-api-script-setup-async-context.md)
- Parent component refs unable to access exposed properties → See [define-expose-before-await](reference/define-expose-before-await.md)
- Functional-programming patterns break expected Vue reactivity behavior → See [composition-api-not-functional-programming](reference/composition-api-not-functional-programming.md)
- React Hook mental model causes incorrect Composition API usage → See [composition-api-vs-react-hooks-differences](reference/composition-api-vs-react-hooks-differences.md)

### Animation
- Animations fail to trigger when DOM nodes are reused → See [animation-key-for-rerender](reference/animation-key-for-rerender.md)
- TransitionGroup list updates feel laggy under load → See [animation-transitiongroup-performance](reference/animation-transitiongroup-performance.md)

### TypeScript
- Mutable prop defaults leak state between component instances → See [ts-withdefaults-mutable-factory-function](reference/ts-withdefaults-mutable-factory-function.md)
- reactive() generic typing causes ref unwrapping mismatches → See [ts-reactive-no-generic-argument](reference/ts-reactive-no-generic-argument.md)
- Template refs throw null access errors before mount or after v-if unmount → See [ts-template-ref-null-handling](reference/ts-template-ref-null-handling.md)
- Optional boolean props behave as false instead of undefined → See [ts-defineprops-boolean-default-false](reference/ts-defineprops-boolean-default-false.md)
- Imported defineProps types fail with unresolvable or complex type references → See [ts-defineprops-imported-types-limitations](reference/ts-defineprops-imported-types-limitations.md)
- Untyped DOM event handlers fail under strict TypeScript settings → See [ts-event-handler-explicit-typing](reference/ts-event-handler-explicit-typing.md)
- Dynamic component refs trigger reactive component warnings → See [ts-shallowref-for-dynamic-components](reference/ts-shallowref-for-dynamic-components.md)
- Union-typed template expressions fail type checks without narrowing → See [ts-template-type-casting](reference/ts-template-type-casting.md)

### Async Components
- Route components misconfigured with defineAsyncComponent lazy loading → See [async-component-vue-router](reference/async-component-vue-router.md)
- Network failures or timeouts loading components → See [async-component-error-handling](reference/async-component-error-handling.md)
- Template refs undefined after component reactivation → See [async-component-keepalive-ref-issue](reference/async-component-keepalive-ref-issue.md)

### Render Functions
- Render function output stays static after state changes → See [rendering-render-function-return-from-setup](reference/rendering-render-function-return-from-setup.md)
- Reused vnode instances render incorrectly → See [render-function-vnodes-must-be-unique](reference/render-function-vnodes-must-be-unique.md)
- String component names render as HTML elements → See [rendering-resolve-component-for-string-names](reference/rendering-resolve-component-for-string-names.md)
- Accessing vnode internals breaks on Vue updates → See [render-function-avoid-internal-vnode-properties](reference/render-function-avoid-internal-vnode-properties.md)
- Vue 2 render function patterns crash in Vue 3 → See [rendering-render-function-h-import-vue3](reference/rendering-render-function-h-import-vue3.md)
- Slot content not rendering from h() → See [rendering-render-function-slots-as-functions](reference/rendering-render-function-slots-as-functions.md)

### KeepAlive
- Child components mount twice with nested Vue Router routes → See [keepalive-router-nested-double-mount](reference/keepalive-router-nested-double-mount.md)
- Memory grows when combining KeepAlive with Transition animations → See [keepalive-transition-memory-leak](reference/keepalive-transition-memory-leak.md)

### Transitions
- JavaScript transition hooks hang without done callback → See [transition-js-hooks-done-callback](reference/transition-js-hooks-done-callback.md)
- Move animations fail on inline list elements → See [transition-group-flip-inline-elements](reference/transition-group-flip-inline-elements.md)
- List items jump instead of smoothly animating → See [transition-group-move-animation-position-absolute](reference/transition-group-move-animation-position-absolute.md)
- Vue 2 to Vue 3 TransitionGroup wrapper changes break layout → See [transition-group-no-default-wrapper-vue3](reference/transition-group-no-default-wrapper-vue3.md)
- Nested transitions cut off before finishing → See [transition-nested-duration](reference/transition-nested-duration.md)
- Scoped styles stop working in reusable transition wrappers → See [transition-reusable-scoped-style](reference/transition-reusable-scoped-style.md)
- RouterView transitions animate unexpectedly on first render → See [transition-router-view-appear](reference/transition-router-view-appear.md)
- Mixing CSS transitions and animations causes timing issues → See [transition-type-when-mixed](reference/transition-type-when-mixed.md)
- Cleanup hooks missed during rapid transition swaps → See [transition-unmount-hook-timing](reference/transition-unmount-hook-timing.md)

### Teleport
- Teleport target element not found in DOM → See [teleport-target-must-exist](reference/teleport-target-must-exist.md)
- Teleported content breaks SSR hydration → See [teleport-ssr-hydration](reference/teleport-ssr-hydration.md)
- Scoped styles not applying to teleported content → See [teleport-scoped-styles-limitation](reference/teleport-scoped-styles-limitation.md)

### Suspense
- Need to handle async errors from Suspense components → See [suspense-no-builtin-error-handling](reference/suspense-no-builtin-error-handling.md)
- Using Suspense with server-side rendering → See [suspense-ssr-hydration-issues](reference/suspense-ssr-hydration-issues.md)
- Async component loading/error UI ignored under Suspense → See [async-component-suspense-control](reference/async-component-suspense-control.md)

### SSR
- HTML differs between server and client renders → See [ssr-hydration-mismatch-causes](reference/ssr-hydration-mismatch-causes.md)
- User state leaks between requests from shared singleton stores → See [state-ssr-cross-request-pollution](reference/state-ssr-cross-request-pollution.md)
- Browser-only APIs crash server rendering in universal code paths → See [ssr-platform-specific-apis](reference/ssr-platform-specific-apis.md)

### Performance
- List children re-render unnecessarily because parent passes unstable props → See [perf-props-stability-update-optimization](reference/perf-props-stability-update-optimization.md)
- Computed objects retrigger effects despite equivalent values → See [perf-computed-object-stability](reference/perf-computed-object-stability.md)

### SFC (Single File Components)
- Trying to use named exports from component script blocks → See [sfc-named-exports-forbidden](reference/sfc-named-exports-forbidden.md)
- Variables not updating in template after changes → See [sfc-script-setup-reactivity](reference/sfc-script-setup-reactivity.md)
- Scoped styles not applying to child component elements → See [sfc-scoped-css-child-component-styling](reference/sfc-scoped-css-child-component-styling.md)
- Scoped styles not applying to dynamic v-html content → See [sfc-scoped-css-dynamic-content](reference/sfc-scoped-css-dynamic-content.md)
- Scoped styles not applying to slot content → See [sfc-scoped-css-slot-content](reference/sfc-scoped-css-slot-content.md)
- Tailwind classes missing when built dynamically → See [tailwind-dynamic-class-generation](reference/tailwind-dynamic-class-generation.md)
- Recursive components not rendering due to name conflicts → See [self-referencing-component-name](reference/self-referencing-component-name.md)

### Plugins
- Debugging why global properties cause naming conflicts → See [plugin-global-properties-sparingly](reference/plugin-global-properties-sparingly.md)
- Plugin not working or inject returns undefined → See [plugin-install-before-mount](reference/plugin-install-before-mount.md)
- Plugin global properties are unavailable in setup-based components → See [plugin-prefer-provide-inject-over-global-properties](reference/plugin-prefer-provide-inject-over-global-properties.md)
- Plugin type augmentation mistakes break ComponentCustomProperties typing → See [plugin-typescript-type-augmentation](reference/plugin-typescript-type-augmentation.md)

### App Configuration
- App configuration methods not working after mount call → See [configure-app-before-mount](reference/configure-app-before-mount.md)
- Chaining app config off mount() fails because mount returns component instance → See [mount-return-value](reference/mount-return-value.md)
- require.context-based component auto-registration fails in Vite → See [dynamic-component-registration-vite](reference/dynamic-component-registration-vite.md)

所有檔案

140 個檔案

安裝 vue-debug-guides

請下載並將技能檔案解壓縮至您的 .claude/skills/ 目錄中。

下載 ZIP

複製儲存庫並將技能檔案複製到您的專案中。

git clone https://github.com/vuejs-ai/skills/tree/main/skills/vue-debug-guides # Copy SKILL.md to your .claude/skills/ directory

複製 複製
快速設定: 將技能資料夾複製到 .claude/skills/ Claude 會自動偵測並使用該技能
儲存庫 vuejs-ai/skills

相關技能

github-code-search
更新時間 2026-06-29
drizzle-orm
更新時間 2026-06-29
prisma-client-api
更新時間 2026-06-29
clickhouse-io
更新時間 2026-06-29
OR