CapacitorGoogleAuth icon indicating copy to clipboard operation
CapacitorGoogleAuth copied to clipboard

Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'

Open rigoarriaza opened this issue 4 years ago • 5 comments

i got this error after ionic serve

ERROR in node_modules/@codetrix-studio/capacitor-google-auth/node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'. [ng] Types of property 'Plugins' are incompatible. [ng] Property 'GoogleAuth' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'. [ng] 16 export interface CapacitorInstance extends CapacitorGlobal { [ng] ~~~~~~~~~~~~~~~~~ [ng] node_modules/@codetrix-studio/capacitor-google-auth/dist/esm/definitions.d.ts:4:9 [ng] 4 GoogleAuth: GoogleAuthPlugin; [ng] ~~~~~~~~~~ [ng] 'GoogleAuth' is declared here.

Do you know how can fix it?

rigoarriaza avatar May 26 '21 13:05 rigoarriaza

That`s because this plugin currently doesn't support Capacitor 3 (see #98). You can try to use this fork of the plugin: https://www.npmjs.com/package/@reslear/capacitor-google-auth

I don't tested it by myself but I will if the repo owners don't update their own plugin.

NLueg avatar May 26 '21 14:05 NLueg

use please https://www.npmjs.com/package/@codetrix-studio/capacitor-google-auth/v/3.0.0

reslear avatar May 31 '21 15:05 reslear

use please https://www.npmjs.com/package/@codetrix-studio/capacitor-google-auth/v/3.0.0

I'm still getting this issue after following all steps. The steps laid out on the github repo and npm's site are different, so it's a bit confusing. But, both didn't work for me. @reslear

Edit: Just wanted to clarify my stack. I'm using AngularFire with Ionic.

maxkarnold avatar Jun 02 '21 05:06 maxkarnold

This problem still appears, because version 2.1.3 has "latest" as dependencies version for capacitor.

Please, release a 2.1.4 with this in package.json :

"dependencies": {
    "@capacitor/core": "^2.4.8"
  },
  "devDependencies": {
    "@capacitor/android": "^2.4.8",
    "@capacitor/ios": "^2.4.8",

Thanks a lot to maintainers !

PS : it is the exact same problem as here : https://github.com/capacitor-community/firebase-crashlytics/issues/41

EDIT : @reslear this version https://www.npmjs.com/package/@codetrix-studio/capacitor-google-auth/v/3.0.0 use Capacitor 3, and this is not compatible with project based on capacitor 2. Unfortunately, I can't upgrade to capacitor 3 for now :/

cyril-colin avatar Jul 26 '21 07:07 cyril-colin

@rigoarriaza

I have created a fork that fix the problem until there is an official version for that. So in your package.json, you can replace "@codetrix-studio/capacitor-google-auth": "^2.1.3", by "@cyril-colin/capacitor-google-auth": "2.1.4",

PS: here is the comparison : https://github.com/CodetrixStudio/CapacitorGoogleAuth/compare/2.1.3...cyril-colin:capacitor2-support

cyril-colin avatar Jul 26 '21 08:07 cyril-colin