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

Module parse failed: Identifier 'ɵngcc0' has already been declared (11:12) #370

Closed
acostajohn opened this issue Mar 16, 2021 · 2 comments
Closed

Comments

@acostajohn
Copy link

I'm getting this compilation error apparently due to a corrupted Ivy generated file:

Error: ./node_modules/@ctrl/ngx-emoji-mart/__ivy_ngcc__/fesm2015/ctrl-ngx-emoji-mart.js 11:12
Module parse failed: Identifier 'ɵngcc0' has already been declared (11:12)
File was processed with these loaders:
 * ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js
 * ./node_modules/@ngtools/webpack/src/ivy/index.js
You may need an additional loader to handle the result of these loaders.
| import * as ɵngcc3 from '@angular/forms';
| 
> import * as ɵngcc0 from '@angular/core';
| import * as ɵngcc1 from '@ctrl/ngx-emoji-mart/ngx-emoji';
| 

I'm using v5.0.2 and Angular v11.2.5. Any ideas why is this happening?

Inspecting /node_modules/@ctrl/ngx-emoji-mart/__ivy_ngcc__/fesm2015/ctrl-ngx-emoji-mart.js, I noticed there is some code defining duplicate identifiers. Not sure why.

import * as ɵngcc0 from '@angular/core';
import * as ɵngcc1 from '@angular/common';
import * as ɵngcc2 from '@ctrl/ngx-emoji-mart/ngx-emoji';
import * as ɵngcc3 from '@angular/forms';

import * as ɵngcc0 from '@angular/core';
import * as ɵngcc1 from '@ctrl/ngx-emoji-mart/ngx-emoji';
@scttcper
Copy link
Owner

try removing your node_modules folder and re-installing

@acostajohn
Copy link
Author

Yes, that fixed it! Thank you so much!!!

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

2 participants