vue注入元件時報錯:did you register the component correctly? For recursive components......
報錯資訊:
vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the “name” option.
找原因:
查了很多,大多數都是說components拼寫錯誤,或者寫了兩個components。這個也需要檢查一下,但是我這邊是沒有這樣的問題的,再查資料發現,有元件迴圈引用的問題:
迴圈呼叫元件時,元件比vue例項後建立,官方文件中提到元件必須先於例項化引入。所以是引入的問題。
解決:
原來的寫法:
修改為
相關文章
- webpack 5 報錯 entry “mian“ not found did you spescify the correct option?Web
- vue元件(component)傳值問題Vue元件
- vs code jshint報錯或者Open browser failed!! Please check if you have installed the browser correctly!錯誤.JSAI
- Vue元件(35)動態元件 component 的 is 到底可以是啥?Vue元件
- Couldn't be opened because you don't have permission to view it 執行時報錯View
- couldn't set locale correctly報錯解決
- Vue腳手架報錯 Component name "Student" should always be multi-word vue/multi-word-component-namesVue
- webpack打包vue檔案時報錯`Unexpected token:`WebVue
- vue-ellipsis-component: 滿足多種場景的 vue 縮略元件Vue元件
- Vue原始碼學習(十八):實現元件註冊(一)Vue.component()和Vue.extend()Vue原始碼元件
- 效能優化之元件懶載入: Vue Lazy Component 介紹優化元件Vue
- PropertyReferenceException: No property courseId found for type CoursePic! Did you mean ‘courseid‘?Exception
- vue init webpack my-project指令時報錯問題(一)VueWebProject
- React Native——Component(元件)React Native元件
- Vue內建的Component標籤用於動態切換元件Vue元件
- vue 元件(component)命名的小細節問題(大小寫問題)Vue元件
- The connection to the server 10.10.0.2:6443 was refused - did you specify the right host or port?Server
- Angular directive&&Vue componentAngularVue
- vue 按照官方文件引入element-ui樣式表時報錯VueUI
- Git push時報錯:fatal: Could not read from remote repository. Please make sure you have the correct access rightsGitREM
- MySQL create function時報錯MySqlFunction
- 安裝PostgreSQL 時報錯SQL
- 封神臺Oracle注入- 報錯注入Oracle
- [Vue warn]: Attribute "id" is ignored on component because the component is a fragment instanVueFragment
- vue3 動態編譯元件失敗:Component provided template option but runtime compilation is not supported in this build of VueVue編譯元件IDEUI
- vue專案部署時報的警告Vue
- dimp時報錯,字串截斷字串
- yii執行phpunit時報錯PHP
- 安裝informix for nt時報錯ORM
- PD連線oracle時報錯Oracle
- 小程式錯誤:Component is not found in path
- PHP 7.3 "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? 解決方法PHPUI
- 談談Ext JS的元件——元件基類:Ext.Component 薦JS元件
- React之元件(component)之間的通訊React元件
- 靜默安裝oracle時報錯Oracle
- 跪問:java編譯時報錯Java編譯
- 跪問:java編譯時報錯!!!Java編譯
- Vue程式碼模組定位外掛vue-component-finder介紹Vue