Skip to content

[REGRESSION] Cannot assign to read only property '__esModule' of object #14890

@appsforartists

Description

@appsforartists

TypeScript Version: 2.2.1

Code

// presuming react-router@4.0.0-alpha.6 is installed
import Link from 'react-router/Link';

Note: Using pundle@2.0.0-beta12 to do bundling

tsconfig.json

{
  "compilerOptions": {
    "declaration": true,
    "lib": [
      "es2015",
      "es2016",
      "es2017",
      "dom"
    ],
    "importHelpers": true,
    "module": "commonjs",
    "moduleResolution": "node",
    "noImplicitAny": true,
    "noImplicitThis": true,
    "sourceMap": true,
    "strictNullChecks": true,
    "target": "es6"
  }
}

Expected behavior:

Link is imported to the local namespace.

Actual behavior:

Uncaught TypeError: Cannot assign to read only property '__esModule' of object '#<Object>'
    at Object.<anonymous> (Link.js:3)

in Chrome 56.0.2924.87. Reverting to TypeScript@2.1.6 solves the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions