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), :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_第1张图片

你可能感兴趣的:(vue 报错:TypeError: Cannot read property '$createElement' of undefined)