angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Dupilcate identifiers

Open Soolan opened this issue 10 years ago • 1 comments

Hi, I installed angularfire2 and I'm using it almost with no issues. The only problem that I have is a long list of duplicates errors in my console. They don't block me from coding but I would be really thankful if I could get rid of them:

[default] /var/www/my-project/node_modules/angularfire2/firebase3.d.ts:12:2 
Duplicate identifier 'INTERNAL'.
[default] /var/www/my-project/node_modules/angularfire2/firebase3.d.ts:13:2 
Duplicate identifier 'app'.
[there are about 186 similar error messages]

I am using the official angular 2 seed project and webpack for serving/building my app. I have a feeling that I might - somehow - import some modules twice, but checking my boot files (and other files that I can think of) it seems they are normal:

import {LocationStrategy, HashLocationStrategy} from '@angular/common';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {HTTP_PROVIDERS} from '@angular/http';
// import {enableProdMode} from '@angular/core';

import {APP_ROUTER_PROVIDERS} from './app/app.routes';
import {App} from './app/app';
import { FIREBASE_PROVIDERS, defaultFirebase } from 'angularfire2';
// enableProdMode()

bootstrap(Sherlock, [
  HTTP_PROVIDERS,
  APP_ROUTER_PROVIDERS,
  { provide: LocationStrategy, useClass: HashLocationStrategy },
  FIREBASE_PROVIDERS,
  // Initialize Firebase app
  defaultFirebase({
    apiKey: "************************",
    authDomain: "**********.firebaseapp.com",
    databaseURL: "https://****************.firebaseio.com",
    storageBucket: "*****************.appspot.com"
  })
])
.catch(err => console.error(err));

Can anyone give me some advice what might cause those errors? Thank you for your time.

Soolan avatar Jul 20 '16 09:07 Soolan

Found the problem: at the root of the project I had to get rid of one of the references in tsconfig.json:

  "files": [
//    "node_modules/angularfire2/firebase3.d.ts",
    "typings/index.d.ts"
  ]

Soolan avatar Jul 20 '16 09:07 Soolan