vue 报错:TypeError: Cannot read property '$createElement' of undefined
Posted cntian
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue 报错:TypeError: Cannot read property '$createElement' of undefined相关的知识,希望对你有一定的参考价值。
TypeError: Cannot read property ‘$createElement‘ of undefined
at render (eval at ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1aaf3fff-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Home.vue?vue&type=template&id=fae5bece& (app.js:1082), <anonymous>:6:16)
报错原因: components 不能加 s
import Home from "../views/Home.vue"
export default {
routes: [
{
path: "/",
components: Home,
},
],
mode: "history"
};
以上是关于vue 报错:TypeError: Cannot read property '$createElement' of undefined的主要内容,如果未能解决你的问题,请参考以下文章
Vue 打包后报错 Uncaught TypeError: Cannot redefine property: $router
Vue 打包后报错 Uncaught TypeError: Cannot redefine property: $router
vue报错 Uncaught TypeError: Cannot read property ‘children ’ of null
vue 报错解决:TypeError: Cannot read property '_t' of undefined"
vue打包后报错TypeError: Cannot read property ‘call’ of undefined解决方法 - 2021-09-18
Vue.js报错—TypeError: Cannot read property 'Name' of undefined