Repository: TypeStrong/ts-loader

Issue #114: error TS2300: Duplicate identifier
Created: 2015-12-03T03:32:33Z
I think it's very important to tell users use "exclude" or "files" in project "tsconfig.json".
If we don't write those in "tsconfig.json", we'll get bunch of errors tells us "Duplicate identifier" in "typescript" module. and the solution to this problem is to tell "tsc" what files we want to compile.
    "exclude": [
        "node_modules"
    ]

Sometimes users just switch loader, because the solution to this problem is not easy to find.
So I think it will be nice to have some instructions in docs.

Duplicate issue #123: TS2300: Duplicate identifier
Created: 2015-12-17T01:52:03Z
package.json
{
  "name": "ReactSPA",
  "version": "1.0.0",
  "description": "",
  "author": {
    "name": "Stuart Zahn",
    "email": "stuart.zahn@gmail.com"
  },
  "private": true,
  "devDependencies": {
    "react": "^0.14.3",
    "react-dom": "^0.14.3",
    "ts-loader": "^0.7.2",
    "typescript": "^1.7.5",
    "webpack": "^1.12.9"
  }
}

webpack.config.js
module.exports = {  
    entry: "./app/app.tsx",
    output: {
        filename: 'bundle.js'
    },
    resolve: {
        extensions: ['','.tsx', '.ts', '.js']
    },
    module: {
        loaders: [
                { test: /\.tsx$/, loader: 'ts-loader' }     
        ]
    }
}

Getting the following errors when running webpack
C:\Repo\ReactSPA\ReactSPA>webpack
ts-loader: Using typescript@1.7.5 and C:\Repo\ReactSPA\ReactSPA\tsconfig.json
Hash: 02f1077e4288ddf98935
Version: webpack 1.12.9
Time: 4693ms
   Asset    Size  Chunks             Chunk Names
bundle.js  678 kB       0  [emitted]  main
    + 161 hidden modules

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(23,9): error TS2300: Duplicate identifier 'usage'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(24,9): error TS2300: Duplicate identifier 'localeMatcher'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(25,9): error TS2300: Duplicate identifier 'numeric'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(26,9): error TS2300: Duplicate identifier 'caseFirst'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(27,9): error TS2300: Duplicate identifier 'sensitivity'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(28,9): error TS2300: Duplicate identifier 'ignorePunctuation'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(32,9): error TS2300: Duplicate identifier 'locale'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(33,9): error TS2300: Duplicate identifier 'usage'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(34,9): error TS2300: Duplicate identifier 'sensitivity'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(35,9): error TS2300: Duplicate identifier 'ignorePunctuation'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(36,9): error TS2300: Duplicate identifier 'collation'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(37,9): error TS2300: Duplicate identifier 'caseFirst'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(38,9): error TS2300: Duplicate identifier 'numeric'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(55,9): error TS2300: Duplicate identifier 'localeMatcher'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(56,9): error TS2300: Duplicate identifier 'style'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(57,9): error TS2300: Duplicate identifier 'currency'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(58,9): error TS2300: Duplicate identifier 'currencyDisplay'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(59,9): error TS2300: Duplicate identifier 'useGrouping'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(60,9): error TS2300: Duplicate identifier 'minimumIntegerDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(61,9): error TS2300: Duplicate identifier 'minimumFractionDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(62,9): error TS2300: Duplicate identifier 'maximumFractionDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(63,9): error TS2300: Duplicate identifier 'minimumSignificantDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(64,9): error TS2300: Duplicate identifier 'maximumSignificantDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(68,9): error TS2300: Duplicate identifier 'locale'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(69,9): error TS2300: Duplicate identifier 'numberingSystem'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(70,9): error TS2300: Duplicate identifier 'style'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(71,9): error TS2300: Duplicate identifier 'currency'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(72,9): error TS2300: Duplicate identifier 'currencyDisplay'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(73,9): error TS2300: Duplicate identifier 'minimumIntegerDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(74,9): error TS2300: Duplicate identifier 'minimumFractionDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(75,9): error TS2300: Duplicate identifier 'maximumFractionDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(76,9): error TS2300: Duplicate identifier 'minimumSignificantDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(77,9): error TS2300: Duplicate identifier 'maximumSignificantDigits'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(78,9): error TS2300: Duplicate identifier 'useGrouping'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(95,9): error TS2300: Duplicate identifier 'localeMatcher'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(96,9): error TS2300: Duplicate identifier 'weekday'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(97,9): error TS2300: Duplicate identifier 'era'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(98,9): error TS2300: Duplicate identifier 'year'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(99,9): error TS2300: Duplicate identifier 'month'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(100,9): error TS2300: Duplicate identifier 'day'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(101,9): error TS2300: Duplicate identifier 'hour'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(102,9): error TS2300: Duplicate identifier 'minute'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(103,9): error TS2300: Duplicate identifier 'second'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(104,9): error TS2300: Duplicate identifier 'timeZoneName'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(105,9): error TS2300: Duplicate identifier 'formatMatcher'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(106,9): error TS2300: Duplicate identifier 'hour12'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(107,9): error TS2300: Duplicate identifier 'timeZone'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(111,9): error TS2300: Duplicate identifier 'locale'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(112,9): error TS2300: Duplicate identifier 'calendar'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(113,9): error TS2300: Duplicate identifier 'numberingSystem'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(114,9): error TS2300: Duplicate identifier 'timeZone'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(115,9): error TS2300: Duplicate identifier 'hour12'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(116,9): error TS2300: Duplicate identifier 'weekday'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(117,9): error TS2300: Duplicate identifier 'era'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(118,9): error TS2300: Duplicate identifier 'year'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(119,9): error TS2300: Duplicate identifier 'month'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(120,9): error TS2300: Duplicate identifier 'day'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(121,9): error TS2300: Duplicate identifier 'hour'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(122,9): error TS2300: Duplicate identifier 'minute'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(123,9): error TS2300: Duplicate identifier 'second'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(124,9): error TS2300: Duplicate identifier 'timeZoneName'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(224,5): error TS2300: Duplicate identifier 'bubbles'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(225,5): error TS2300: Duplicate identifier 'cancelable'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(233,5): error TS2300: Duplicate identifier 'duration'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(234,5): error TS2300: Duplicate identifier 'length'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(235,5): error TS2300: Duplicate identifier 'numberOfChannels'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(236,5): error TS2300: Duplicate identifier 'sampleRate'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
(246,5): error TS2300: Duplicate identifier 'size'.

ERROR in C:\Repo\ReactSPA\ReactSPA\node_modules\typescript\lib\lib.webworker.d.ts
^CTerminate batch job (Y/N)? y

C:\Repo\ReactSPA\ReactSPA>

Closing comment (2015-12-17T18:25:36Z): This is a duplicate of : #114