码迷,mamicode.com
首页 > 其他好文 > 详细

vue 报错:TypeError: Cannot read property '$createElement' of undefined

时间:2020-07-12 18:55:59      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:图片   mod   ror   原因   mode   cannot   rect   rop   cto   

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

标签:图片   mod   ror   原因   mode   cannot   rect   rop   cto   

原文地址:https://www.cnblogs.com/cntian/p/13289226.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!