vue-cli3 typescript Uncaught TypeError: Cannot set property 'components' of undefined

vue-cli3 typescript 

原因是

@Component({})
    export default class Child extends Vue {

上面没有加

@Component({})

导致的,

加上 

@Component({})
就好了
Uncaught TypeError: Cannot set property 'components' of undefined
    at installComponents (installComponents.js?6544:11)
    at eval (Home.vue?a062:37)
    at Module../src/views/Home.vue (app.js:8305)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (router.ts?5f86:1)
    at Module../src/router.ts (app.js:8281)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (main.ts:11)

 

你可能感兴趣的:(typescript,vue-cli3,vue,vue-cli,javascript)