VueRouterでTypeError: Cannot read property '$createElement' of undefinedのエラーが出た
Vue CLIなど使わず手作業で一らかアプリケーションを作っていた時、VueRouterが原因でブラウザのコンソールに以下のエラーが・・・
TypeError: Cannot read property '$createElement' of undefined
最初何が原因かわからず戸惑いましたが、超初歩的なミスでした。
VueRouterではcomponents:
ではなくcomponent:
・・・。
import Vue from "vue" import Router from "vue-router" import Message from "../components/Message" Vue.use(Router) export default new Router({ mode: "history", routes: [ { path: "/", name: "Message", component: Message # ここをcomponents:にしていた } ] })