v-perfect-signature
v-perfect-signature copied to clipboard
Vue2 errors with vue-demi
When adding the library in Vue2 I get the following errors:
ERROR in ./frontend/node_modules/v-perfect-signature/dist/index.d.ts(7,34):
7:34 '"./frontend/node_modules/vue-demi/lib/index"' has no exported member named 'DefineComponent'. Did you mean 'defineComponent'?
5 |
6 | declare type InputPoints = number[];
> 7 | declare const _default: vue_demi.DefineComponent<{
| ^
8 | width: {
9 | type: StringConstructor;
10 | required: false;
ERROR in ./frontend/node_modules/v-perfect-signature/dist/index.d.ts(54,13):
54:13 Namespace '"./frontend/node_modules/vue-demi/lib/index"' has no exported member 'ComponentOptionsMixin'.
52 | resizeCanvas(clearCanvas?: boolean): void;
53 | inputPointsHandler(): void;
> 54 | }, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, ("onBegin" | "onEnd")[], "onBegin" | "onEnd", vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<{
| ^
55 | width?: unknown;
56 | height?: unknown;
57 | backgroundColor?: unknown;
ERROR in ./frontend/node_modules/v-perfect-signature/dist/index.d.ts(54,45):
54:45 Namespace '"./frontend/node_modules/vue-demi/lib/index"' has no exported member 'ComponentOptionsMixin'.
52 | resizeCanvas(clearCanvas?: boolean): void;
53 | inputPointsHandler(): void;
> 54 | }, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, ("onBegin" | "onEnd")[], "onBegin" | "onEnd", vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<{
| ^
55 | width?: unknown;
56 | height?: unknown;
57 | backgroundColor?: unknown;
ERROR in ./frontend/node_modules/v-perfect-signature/dist/index.d.ts(54,123):
54:123 Namespace '"./frontend/node_modules/vue-demi/lib/index"' has no exported member 'VNodeProps'.
52 | resizeCanvas(clearCanvas?: boolean): void;
53 | inputPointsHandler(): void;
> 54 | }, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, ("onBegin" | "onEnd")[], "onBegin" | "onEnd", vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<{
| ^
55 | width?: unknown;
56 | height?: unknown;
57 | backgroundColor?: unknown;
ERROR in ./frontend/node_modules/v-perfect-signature/dist/index.d.ts(54,145):
54:145 Namespace '"./frontend/node_modules/vue-demi/lib/index"' has no exported member 'AllowedComponentProps'.
52 | resizeCanvas(clearCanvas?: boolean): void;
53 | inputPointsHandler(): void;
> 54 | }, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, ("onBegin" | "onEnd")[], "onBegin" | "onEnd", vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<{
| ^
55 | width?: unknown;
56 | height?: unknown;
57 | backgroundColor?: unknown;
ERROR in ./frontend/node_modules/v-perfect-signature/dist/index.d.ts(54,178):
54:178 Namespace '"./frontend/node_modules/vue-demi/lib/index"' has no exported member 'ComponentCustomProps'.
52 | resizeCanvas(clearCanvas?: boolean): void;
53 | inputPointsHandler(): void;
> 54 | }, vue_demi.ComponentOptionsMixin, vue_demi.ComponentOptionsMixin, ("onBegin" | "onEnd")[], "onBegin" | "onEnd", vue_demi.VNodeProps & vue_demi.AllowedComponentProps & vue_demi.ComponentCustomProps, Readonly<{
| ^
55 | width?: unknown;
56 | height?: unknown;
57 | backgroundColor?: unknown;
v-perfect-signature: 1.0.0 vue: 2.6.14
When I set "skipLibCheck": true
in tsconfig.ts
everything works fine.
Will check in a bit. You have composition api installed right?
Yes, I use @vue/composition-api
with 1.2.4
. And I use typescript
with 4.4.4
.
I successfully run @vueuse/core
which also depends on vue-demi
without errors.
Can you create a simple repro that I can clone? Thanks
Sure, have a look at https://github.com/mheers/v-signature-error
Can you update to the latest version (1.1.2) and try again?
I updated my demo repo at https://github.com/mheers/v-signature-error and still have no luck. It still reports the same errors.
It works fine if the vue2 project is not typescript based, so the error must be lying here.
https://github.com/vueuse/vue-demi/issues/152