I have an existing Vuejs2 project that I just recently upgraded to Typescript with:
vue add typescript
I am now seeing this error that I can't quite find answers for in a Google search:
DONE Compiled successfully in 2386ms 1:49:51 PM
ERROR in .../front-end/src/main.ts(19,9):
19:9 No overload matches this call.
Overload 1 of 2, '(plugin: PluginObject<unknown> | PluginFunction<unknown>, options?: unknown): VueConstructor<Vue>', gave the following error.
Argument of type 'typeof import(".../front-end/node_modules/aws-amplify/lib-esm/index")' is not assignable to parameter of type 'PluginObject<unknown> | PluginFunction<unknown>'.
Property 'install' is missing in type 'typeof import(".../front-end/node_modules/aws-amplify/lib-esm/index")' but required in type 'PluginObject<unknown>'.
Overload 2 of 2, '(plugin: PluginObject<any> | PluginFunction<any>, ...options: any[]): VueConstructor<Vue>', gave the following error.
Argument of type 'typeof import(".../front-end/node_modules/aws-amplify/lib-esm/index")' is not assignable to parameter of type 'PluginObject<any> | PluginFunction<any>'.
Property 'install' is missing in type 'typeof import(".../front-end/node_modules/aws-amplify/lib-esm/index")' but required in type 'PluginObject<any>'.
17 | })
18 |
> 19 | Vue.use(AmplifyModules)
| ^
20 | Vue.use(VuetifyConfirm, {
21 | vuetify,
22 | buttonFalseColor: "primary",
Version: typescript 4.1.6
Time: 1727ms
App running at:
- Local: http://localhost:8080/
- Network: http://192.168.1.149:8080/
My dependencies in package.json contains "aws-amplify": "^1.3.3"
I'm pretty new to Typescript and not really sure why it can't find the install method, or what type I might explicitly give it to make the plugin work. It's worth noting, though, that my app seems to still compile and work just fine. Including AWS Amplify elements that affect the login process.
Anyone know how to get rid of this error message and satisfy Typescript?