Skip to content

@types/node + typescript@1.9.0-dev.20160521-1.0 results in duplicate identifier 'stack' error #8737

@IgorMinar

Description

@IgorMinar

TypeScript Version:

1.9.0-dev.20160521-1.0

Code

Install node d.ts file:

npm install --save-dev @types/node@4.0.21-alpha

index.ts:

console.log('hello');

tsconfig.json:

{
    "compilerOptions": {
        "noImplicitAny": true,
        "strictNullChecks": true,
        "moduleResolution": "node",
        "pretty": true,
        "allowSyntheticDefaultImports": true,
        "skipDefaultLibCheck": true,
        // output options
        "outDir": "dist/",
        "rootDir": "./src",
        "module": "commonjs",
        "target": "es6",
        "declaration": true,
        "sourceMap": true,
        "inlineSources": true
    },
    "files": [
        "src/index.ts",
        "node_modules/@types/node/index.d.ts"
    ]
}

Expected behavior:

the build should work

Actual behavior:

tsc errors with:

11:24:25 PM - File change detected. Starting incremental compilation...

13     stack?: string;
       ~~~~~

node_modules/@types/node/index.d.ts(13,5): error TS2300: Duplicate identifier 'stack'.


883     stack?: string;
        ~~~~~

node_modules/typescript/lib/lib.es6.d.ts(883,5): error TS2300: Duplicate identifier 'stack'.

// @RyanCavanaugh

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions