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
For me, using import * as Vue from "vue"
instead of import Vue from "vue"
fixed the problem for my projects with a similar setup, i.e.:
//import Vue from "vue";
import * as Vue from "vue";
import Component from "vue-class-component";
interface HelloWorldInterface {
msg: string;
clickHandler(): void;
}
@Component
export default class HelloWorld extends Vue implements HelloWorldInterface {
msg = "Hello!!";
clickHandler() {
window.alert(this.msg);
}
}
It is a lot more cumbersome, but at least it works. I have setup a proof-of-concept example using vue-cli: https://codesandbox.io/s/mjvjw2xw39