[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.問題的解決方法


通過vuecli學習路由封裝的時候出現如下錯誤:

vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: <router-vue> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <App> at src/App.vue
       <Root>
錯誤示圖

解決方法:

報錯提示是因為沒有注冊路由出現的錯誤,所以我們應該要先從router.js中開始找

  • 在router.js中導入路由,注冊router插件
修改router.js文件
  • 如果再次運行還是會出現錯誤,試着到APP.vue里面找錯誤,看App.vue里面是否缺<router-view></router-view>,如果缺少就填上
修改APP.vue文件
  • 修改完后,運行,錯誤就解決了
成功


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 ]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.解決方法 vue報錯[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. VUE報錯解決方法 Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. at src/views/index/"> [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in ---> at src/views/index/ Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. vue引入組建報錯Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in vue組件注冊錯誤:Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. 百度地圖API name未定義[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM