[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-2026 CODEPRJ.COM