Skip to content

When using importHelpers option, compiler tries and fails to resolve module 'tslib' for each file compiled #12875

@frankwallis

Description

@frankwallis

TypeScript Version: 2.1.4

Code

{
  "compilerOptions": {
    "target": "es5",
    "jsx": "react",
    "declaration": false,
    "importHelpers": true,
    "noEmitHelpers": true,
    "lib": [ "dom", "es6" ],
    "moduleResolution": "node",
    "module": "commonjs",
    "experimentalDecorators": true,
    "inlineSourceMap": true,
    "inlineSources": false,
    "noImplicitAny": false,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "baseUrl": "."
  }
}
tsc --traceResolution > trace.out

Expected behavior:
Compiler should not try to resolve tslib

Actual behavior:
Compile attempts to resolve tslib for each file compiled, trace.out contains the following text hundreds of times:

======== Resolving module 'tslib' from 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/action-point-action-creators.ts'. ========
Explicitly specified module resolution kind: 'NodeJs'.
'baseUrl' option is set to 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts', using this value to resolve non-relative module name 'tslib'
Resolving module name 'tslib' relative to base url 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts' - 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib'.
Loading module as file / folder, candidate module location 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib'.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib/index.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib/index.d.ts' does not exist.
Loading module 'tslib' from 'node_modules' folder.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib.ts' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/node_modules/tslib.ts' does not exist.
File 'D:/Source/Brand/node_modules/tslib.tsx' does not exist.
File 'D:/Source/Brand/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/Brand/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/Brand/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/Brand/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/Brand/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/Brand/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/Brand/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/Source/node_modules/tslib.ts' does not exist.
File 'D:/Source/node_modules/tslib.tsx' does not exist.
File 'D:/Source/node_modules/tslib.d.ts' does not exist.
File 'D:/Source/node_modules/tslib/package.json' does not exist.
File 'D:/Source/node_modules/tslib/index.ts' does not exist.
File 'D:/Source/node_modules/tslib/index.tsx' does not exist.
File 'D:/Source/node_modules/tslib/index.d.ts' does not exist.
File 'D:/Source/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/Source/node_modules/@types/tslib/package.json' does not exist.
File 'D:/Source/node_modules/@types/tslib/index.d.ts' does not exist.
File 'D:/node_modules/tslib.ts' does not exist.
File 'D:/node_modules/tslib.tsx' does not exist.
File 'D:/node_modules/tslib.d.ts' does not exist.
File 'D:/node_modules/tslib/package.json' does not exist.
File 'D:/node_modules/tslib/index.ts' does not exist.
File 'D:/node_modules/tslib/index.tsx' does not exist.
File 'D:/node_modules/tslib/index.d.ts' does not exist.
File 'D:/node_modules/@types/tslib.d.ts' does not exist.
File 'D:/node_modules/@types/tslib/package.json' does not exist.
File 'D:/node_modules/@types/tslib/index.d.ts' does not exist.
'baseUrl' option is set to 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts', using this value to resolve non-relative module name 'tslib'
Resolving module name 'tslib' relative to base url 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts' - 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib'.
Loading module as file / folder, candidate module location 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib'.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib/index.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/tslib/index.jsx' does not exist.
Loading module 'tslib' from 'node_modules' folder.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib/index.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/action-point/node_modules/tslib/index.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib/index.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/actions/node_modules/tslib/index.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib/index.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/Scripts/node_modules/tslib/index.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib/index.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/Project/node_modules/tslib/index.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib/index.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/Product/node_modules/tslib/index.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib/index.js' does not exist.
File 'D:/Source/Brand/v3.0a/Workspace/node_modules/tslib/index.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib.js' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib.jsx' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib/index.js' does not exist.
File 'D:/Source/Brand/v3.0a/node_modules/tslib/index.jsx' does not exist.
File 'D:/Source/Brand/node_modules/tslib.js' does not exist.
File 'D:/Source/Brand/node_modules/tslib.jsx' does not exist.
File 'D:/Source/Brand/node_modules/tslib/package.json' does not exist.
File 'D:/Source/Brand/node_modules/tslib/index.js' does not exist.
File 'D:/Source/Brand/node_modules/tslib/index.jsx' does not exist.
File 'D:/Source/node_modules/tslib.js' does not exist.
File 'D:/Source/node_modules/tslib.jsx' does not exist.
File 'D:/Source/node_modules/tslib/package.json' does not exist.
File 'D:/Source/node_modules/tslib/index.js' does not exist.
File 'D:/Source/node_modules/tslib/index.jsx' does not exist.
File 'D:/node_modules/tslib.js' does not exist.
File 'D:/node_modules/tslib.jsx' does not exist.
File 'D:/node_modules/tslib/package.json' does not exist.
File 'D:/node_modules/tslib/index.js' does not exist.
File 'D:/node_modules/tslib/index.jsx' does not exist.
======== Module name 'tslib' was not resolved. ========

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions