TypeError: Object prototype may only be an Object or null: undefined
I got some error in my project. I\'m using vuejs, typescript and jest.
It\'s just simp
The problem seems to be how Vue2 exposes itself, so import Vue from "vue" causes this error.
I fixed it by using 'vue-property-decorator' like this:
import { Vue, Component, Prop } from 'vue-property-decorator';
So what does 'vue-property-decorator' do? It imports and then exports Vue not as default but named export. I guess you could do that in your own code, if you wanted.
import Vue, { PropOptions, WatchOptions } from 'vue';
...
export { Component, Vue, mixins as Mixins };