Vue component reports an error:
[Vue warn]: Failed to mount component: template or render function not defined.
found in
—> & lt; Anonymous>
< App> at src/App.vue
< Root>
Error code:
Solution:
Change component to components
Modified code:
Why report an error
there is a pattern called named view in Vue router
Originally, only one routing view can correspond to one component in a page. Now, multiple routing views can correspond to multiple components.
When using multiple components, use components and write them in the form of objects
When using a single component, use component
More routing, component details: https://blog.csdn.net/xiaodi520520/article/details/88866427
Similar Posts:
- Odoo14 TypeError: Cannot read property ‘classList’ of undefined
- Invalid prop: type check failed for prop value
- 「ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory」
- FTP upload file error: failure writing to local file
- ERROR Failed to compile with 1 errors
- ImportError: cannot import name ‘patterns’
- [Solved] Django error: AttributeError: ‘QuerySet’ object has no attribute ‘id’
- How to Solve Critical dependency: the request of a dependency is an expression?
- com.alibaba.fastjson.JSONException: syntax error, expect {, actual [, pos 0