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='.

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? :)
@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:

Then when I try npm serve same error:

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?_