-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
Hi,
First of all, I'd like to say that this post is not a duplicate of this one. I read it and it does not really apply.
I'm currently using TypeScript 2.0.3 to be able to use "@types" and I'm creating an Angular2 app. Actually, everything was fine with the app, then I tried to use ckeditor. So I installed it via NPM and I noticed that "CKEDITOR" was not know in my ts files. So I installed "@types/ckeditor" to make it available.
I'm also using webpack to bundle my whole application and since the moment I downloaded the typings for "ckeditor", I have a bunch of:
Duplicate identifier 'text'.
Duplicate identifier 'cssStyle'.
...
Note that I don't think that it comes from the typings themselves as I also have the exact same issue with "js-base64". At first, I thought that they were the culprit but now that I also have this behaviour with "ckeditor", I'm starting to doubt...
Regarding webpack, I have nothing fancy. The only thing worth showing is:
entry: {
'polyfills': './src/polyfills.ts',
'vendor': './src/vendor.ts',
'app': './src/main.ts'
}
And here is what the "vendor.ts" file contains:
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/core';
import '@angular/common';
import 'rxjs';
import 'ckeditor';
import 'ckeditor/lang/en';
Note that the bundle is correctly generated and the site works (well almost but that's my fault ^^), but I'm flooded by the "duplicate identifier" errors and I could miss other errors. I'm currently using webpack 1.13.2 and webpack-dev-server 1.16.1 but I tried with webpack 2 and I have the same issue.
Besides, I also exclude "node_modules" from my "tsconfig.json".
One last thing: I don't do any reference to "@types/ckeditor/index.d.ts" anywhere in my project and I don't think angular2 is doing it either, so I don't understand how the references inside could be duplicated.
Thanks