Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Duplicate identifier 'export=' #562

Closed
JimLynchCodes opened this issue Sep 25, 2016 · 12 comments
Closed

Error: Duplicate identifier 'export=' #562

JimLynchCodes opened this issue Sep 25, 2016 · 12 comments

Comments

@JimLynchCodes
Copy link

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

@mukesh51
Copy link
Contributor

@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"
]

@JimLynchCodes
Copy link
Author

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

@mukesh51
Copy link
Contributor

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

@JimLynchCodes
Copy link
Author

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

@mukesh51
Copy link
Contributor

@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"

@JimLynchCodes
Copy link
Author

@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

@mukesh51
Copy link
Contributor

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

@JimLynchCodes
Copy link
Author

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

@davideast
Copy link
Member

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

@JimLynchCodes
Copy link
Author

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.

@AnuragKDwivedi
Copy link

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 !

@kumaresan-subramani
Copy link

kumaresan-subramani commented Apr 4, 2018

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! angular2-webpack-seed@1.2.0 scripts: ngc -p tsconfig-aot.json
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-seed@1.2.0 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants