angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Issue - angularfire2 doesn't work on my Ionic2 project after released to beta.6.

Open sky09 opened this issue 10 years ago • 5 comments

Hello, I have an issue on my Ionic 2 project using Angularfire2. It works properly on [email protected], just 2 days ago. Here is the issue I faced.

[21:54:35]  lint finished in 4.51 s
[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 12
            Duplicate identifier 'Promise'.

      L11:  static reject(error: Error): firebase.Promise<any>;
      L12:  static resolve<T>(value?: T): firebase.Promise<T>;

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 17
            Duplicate identifier 'Promise_Instance'.

      L16:      resolver:
      L17:          (a?: (a: T) => undefined, b?: (a: Error) => undefined) => any);
      L18:  catch (onReject?: (a: Error) => any): firebase.Thenable<any>;

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 130
            Duplicate identifier 'EmailAuthProvider'.

     L129:  static credential(email: string, password: string):
[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 135
     L130:      firebase.auth.AuthCredential;

            Duplicate identifier 'EmailAuthProvider_Instance'.

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 144
[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 148
            Duplicate identifier 'FacebookAuthProvider'.

     L143:    static credential(token: string): firebase.auth.AuthCredential;
     L144:  }
     L145:  class FacebookAuthProvider_Instance implements firebase.auth.AuthProvider {

            Duplicate identifier 'FacebookAuthProvider_Instance'.

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 153
     L147:    providerId: string;
     L148:  }

            Duplicate identifier 'GithubAuthProvider'.

     L152:    static credential(token: string): firebase.auth.AuthCredential;
     L153:  }
     L154:  class GithubAuthProvider_Instance implements firebase.auth.AuthProvider {

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 157
            Duplicate identifier 'GithubAuthProvider_Instance'.

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 162
     L156:    providerId: string;
[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 167
[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 172
     L157:  }

            Duplicate identifier 'GoogleAuthProvider'.

     L161:  static credential(idToken?: string|null, accessToken?: string|null):
     L162:      firebase.auth.AuthCredential;

            Duplicate identifier 'GoogleAuthProvider_Instance'.

     L166:    providerId: string;
     L167:  }

            Duplicate identifier 'TwitterAuthProvider'.

     L171:  static credential(token: string, secret: string):
     L172:      firebase.auth.AuthCredential;

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 177
            Duplicate identifier 'TwitterAuthProvider_Instance'.

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 181
            Duplicate identifier 'UserCredential'.

     L180:    user: firebase.User | null
     L181:  };

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 339
            Duplicate identifier 'StringFormat'.

     L338:  BASE64: StringFormat,
     L339:  BASE64URL: StringFormat,
     L340:  DATA_URL: StringFormat,

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 340
            Duplicate identifier 'StringFormat'.

     L339:  BASE64URL: StringFormat,
     L340:  DATA_URL: StringFormat,
     L341:  RAW: StringFormat,

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 347
            Duplicate identifier 'TaskEvent'.

     L346:    STATE_CHANGED: TaskEvent,
     L347:  };

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 348
            Duplicate identifier 'TaskEvent'.

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 352
            Duplicate identifier 'TaskState'.

     L351:  CANCELED: TaskState,
     L352:  ERROR: TaskState,
     L353:  PAUSED: TaskState,

[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 353
            Duplicate identifier 'TaskState'.

     L352:  ERROR: TaskState,
     L353:  PAUSED: TaskState,
     L354:  RUNNING: TaskState,
[21:54:35]  typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin            e: 390

            Duplicate identifier 'export='.

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 12
            Duplicate identifier 'Promise'.

      L11:  static reject(error: Error): firebase.Promise<any>;
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 17
      L12:  static resolve<T>(value?: T): firebase.Promise<T>;

            Duplicate identifier 'Promise_Instance'.

      L16:      resolver:
      L17:          (a?: (a: T) => undefined, b?: (a: Error) => undefined) => any);
      L18:  catch (onReject?: (a: Error) => any): firebase.Thenable<any>;

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 132
            Duplicate identifier 'EmailAuthProvider'.

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 137
     L131:  static credential(email: string, password: string):
     L132:      firebase.auth.AuthCredential;

            Duplicate identifier 'EmailAuthProvider_Instance'.

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 146
            Duplicate identifier 'FacebookAuthProvider'.

     L145:    static credential(token: string): firebase.auth.AuthCredential;
     L146:  }
     L147:  class FacebookAuthProvider_Instance implements firebase.auth.AuthProvider {

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 150
            Duplicate identifier 'FacebookAuthProvider_Instance'.

     L149:    providerId: string;
     L150:  }

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 155
            Duplicate identifier 'GithubAuthProvider'.

     L154:    static credential(token: string): firebase.auth.AuthCredential;
     L155:  }
     L156:  class GithubAuthProvider_Instance implements firebase.auth.AuthProvider {

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 159
            Duplicate identifier 'GithubAuthProvider_Instance'.

     L158:    providerId: string;
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 164
     L159:  }

            Duplicate identifier 'GoogleAuthProvider'.

     L163:  static credential(idToken?: string|null, accessToken?: string|null):
     L164:      firebase.auth.AuthCredential;

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 169
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 174
            Duplicate identifier 'GoogleAuthProvider_Instance'.

     L168:    providerId: string;
     L169:  }

            Duplicate identifier 'TwitterAuthProvider'.
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 179

     L173:  static credential(token: string, secret: string):
     L174:      firebase.auth.AuthCredential;

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 183
            Duplicate identifier 'TwitterAuthProvider_Instance'.

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 354
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 355
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 362
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 363
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 367
[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 368
            Duplicate identifier 'UserCredential'.

     L182:    user: firebase.User | null
     L183:  };

            Duplicate identifier 'StringFormat'.

     L353:  BASE64: StringFormat,
     L354:  BASE64URL: StringFormat,
     L355:  DATA_URL: StringFormat,

            Duplicate identifier 'StringFormat'.

     L354:  BASE64URL: StringFormat,
     L355:  DATA_URL: StringFormat,
     L356:  RAW: StringFormat,

            Duplicate identifier 'TaskEvent'.

     L361:    STATE_CHANGED: TaskEvent,
     L362:  };

            Duplicate identifier 'TaskEvent'.

            Duplicate identifier 'TaskState'.

     L366:  CANCELED: TaskState,
     L367:  ERROR: TaskState,
     L368:  PAUSED: TaskState,

            Duplicate identifier 'TaskState'.

[21:54:35]  typescript: .../WorkSpace/Phonegap/Boon Buy Network/BoonBuy/node_modules/firebase/firebase.d.ts, lin            e: 405
     L367:  ERROR: TaskState,
     L368:  PAUSED: TaskState,
     L369:  RUNNING: TaskState,

            Duplicate identifier 'export='.

[21:54:35]  transpile failed

... "angularfire2": "^2.0.0-beta.5", "firebase": "^3.5.2", "ionic-angular": "2.0.0-rc.1", "ionic-native": "2.2.3", "moment": "2.15.1", "rxjs": "5.0.0-beta.12", "zone.js": "0.6.21" ... "@ionic/app-scripts": "0.0.37", "@types/request": "0.0.30", "typescript": "^2.0.3"

Windows 10 x64, Node 6.9.1, Cordova 6.3.1

sky09 avatar Nov 03 '16 14:11 sky09

Just delete types from tsconfig, you can find more information in the changelog: https://github.com/angular/angularfire2/blob/master/CHANGELOG.md

chrste90 avatar Nov 03 '16 15:11 chrste90

@tinydream12 Check out Issue https://github.com/angular/angularfire2/issues/658 if @Chris1308's answer doesn't work for you. Seems there are be multiple ways to fix it.

AdamJo avatar Nov 03 '16 16:11 AdamJo

This doesn't follow the issue template and has already been multiple fixes suggested, which aren't refuted here.

katowulf avatar Nov 03 '16 16:11 katowulf

thanks @Chris1308 , it works fine. 👍

sky09 avatar Nov 03 '16 16:11 sky09

i have an error... image

Jennyshah avatar Oct 05 '17 08:10 Jennyshah