Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build react project when using tslib #13

Closed
nickzelei opened this issue Dec 16, 2016 · 1 comment
Closed

Unable to build react project when using tslib #13

nickzelei opened this issue Dec 16, 2016 · 1 comment

Comments

@nickzelei
Copy link

I wanted to try using tslib with my React project, but am running into tsc compiler errors. It works fine with Webpack, but when compiling with "tsc" the React type definitions are not playing nicely.

186     class PureComponent<P, S> extends Component<P, S> { }
                                  ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@types/react/index.d.ts(186,31): error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.

I have tslib installed as a dev-dependency and in my tsconfig.json I have the compilerOption set: "importHelpers": true

@nickzelei nickzelei changed the title Unable to compile React when using tslib Unable to build react project when using tslib Dec 16, 2016
@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Dec 17, 2016

This is a duplicate of microsoft/TypeScript#12724. We'll be publishing TypeScript 2.1.5, but you can ignore the error for the time being if you still need to use tslib (or install typescript@next).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants