Angularfire: Error: Duplicate identifier 'export='

Created on 25 Sep 2016  路  12Comments  路  Source: angular/angularfire

When I run ng serve or ngbuild I get an error saying, "Duplicate identifier 'export='.", and it's complaining about the node_modules/firebase/firebase.d.ts file:

ERROR in [default] /Users/jim/Git-Projects/Park-Boys-Bootcamp/4-Firebase-Rooms/project/node_modules/firebase/firebase.d.ts:391:2 
Duplicate identifier 'export='.

ERROR in [default] /Users/jim/Git-Projects/Park-Boys-Bootcamp/4-Firebase-Rooms/project/src/typings/modules/firebase/index.d.ts:498:0 
Duplicate identifier 'export='.

src_ _angular-cli_term_program_apple_terminal_term_xterm-256color_ _125x24_and_src_ _-bash_ _142x24

in my package.json:

angular: 2.0.1

"angularfire2": "^2.0.0-beta.5",
"core-js": "^2.4.1",
"firebase": "^3.4.0",

Any ideas on how to fix? Anyone else getting this? thanks? :)

All 12 comments

@JimTheMan are you on the latest version of angular. one of the options you can try is removing the following entry from src/tsconfig.json, which actually is not recommended as per installation guide.

"types": [
"firebase"
]

Hi @mukesh51! Thanks, but I already have "types":[
"firebase"
]

in the tsconfig.json file.

I tried with Angular 2.0.0 and 2.0.1

Can you show your code with plnkr. also do you want to try removing that entry mentioned above and see how it looks.

I'm getting the same error after removing it. It would be hard for me to fit it into a plunkr, but it is an angular cli project. You can see the source code here: https://github.com/ParkBoys/Park-Boys-Bootcamp/tree/master/4-Firebase-Rooms/project

@JimTheMan I suspect something to do with your node_modules. Can you try deleting and re-installing your node_modules. Also put this entry back in your src/tsconfig.json. Look at the troubleshooting section of install guide. Also, what output do you see, when you execute the following command "ng -v"

@mukesh51 Thanks, but I'm still getting the same error. :'(

I've been deleting and reinstalling node_modules this whole time. I am getting this error now though on npm i:

src_ _angular-cli_term_program_apple_terminal_term_xterm-256color_ _142x24

Then when I try npm serve same error:
src_ _-bash_ _125x24_and_ng-nj_org_ _gulp_term_program_apple_terminal_term_xterm-256color_ _80x24

ng -v returns this:
angular-cli: 1.0.0-beta.15
node: 5.11.1
os: darwin x64

@JimTheMan This was called out here issue 520 and it was resolved by upgrading the angular-cli version, but not necessarily that is the solution.

You can safely remove the firebase entry from types array. See issues 525

@jeffbcross @davideast any thoughts ?

That thread doesn't really give me anything else to try. :/

@JimTheMan Are you still having this problem? It should have been fixed in the last release.

Hi @davideast !

Sorry, I actually moved my project over to angular cli so I'm not sure. :/

I can try it, but for now I'll close the issue. Thanks.

hello @davideast !
Im getting the same problem .

And when im trying -->const promise = firebase.auth().createUserWithEmailAndPassword(this.email,this.password)
.then(function(user){
console.log(user)
}).catch(function(error){
console.log(error)
});

im getting firebase is not defined !

_Error at D:/hence/angular2-webpack-seed/node_modules/@types/node/index.d.ts:5957:5: Duplicate identifier 'export='.
Error at D:/hence/angular2-webpack-seed/node_modules/@types/requirejs/index.d.ts:38:2: Duplicate identifier 'export='.
Error at D:/hence/angular2-webpack-seed/node_modules/@types/requirejs/index.d.ts:422:13: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'NodeRequire', but here has type 'Require'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] scripts: ngc -p tsconfig-aot.json
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] scripts script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
_

_This is error, how should i resolve it?_

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StephenFluin picture StephenFluin  路  3Comments

goekaypamuk picture goekaypamuk  路  3Comments

Leanvitale picture Leanvitale  路  3Comments

KLiFF2606 picture KLiFF2606  路  3Comments

jnupeter picture jnupeter  路  3Comments