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

error TS2604: JSX element type 'AppBar' does not have any construct or call signatures #11698

Closed
gsbelarus opened this issue Jun 4, 2018 · 9 comments
Labels
external dependency Blocked by external dependency, we can’t do anything about it typescript

Comments

@gsbelarus
Copy link

After upgrading to TS 2.9.1 and MUI 1.2 I have a bunch or errors during compilation:

error TS2604: JSX element type 'AppBar' does not have any construct or call signatures.

error TS2604: JSX element type 'Toolbar' does not have any construct or call signatures.

error TS2604: JSX element type 'Button' does not have any construct or call signatures.

error TS2604: JSX element type 'Component' does not have any construct or call signatures.

@gsbelarus
Copy link
Author

Mentioned code worked with TS 2.8.3 and MUI 1.1. Are there any breaking incompatibilities between 1.1 and 1.2?

@mctep
Copy link
Contributor

mctep commented Jun 4, 2018

@gsbelarus Do you use allowSyntheticDefaultImports compiler option?

Looks like the issue happens when this option is enabled.

@gsbelarus
Copy link
Author

yes, I have allowSyntheticDefaultImports = true

@mctep
Copy link
Contributor

mctep commented Jun 4, 2018

The fix will be in the next TS release (v2.9.2): microsoft/TypeScript#24528 (comment)

@gsbelarus
Copy link
Author

Ok. Will wait and check then and reopen if needed.

@mctep
Copy link
Contributor

mctep commented Jun 4, 2018

@gsbelarus could you try reproduce the issue with typescript@next?

@gsbelarus
Copy link
Author

works well with TS3.0.0.

@JSONRice
Copy link

@mctep @gsbelarus I tried with allowSyntheticDefaultImports : true then allowSyntheticDefaultImports : false and am seeing the same error. Running tsc 2.9.

andywer pushed a commit to satoshipay/solar that referenced this issue Jun 15, 2018
Issue with material-ui v1 and TS 2.9: <mui/material-ui#11698>
@ssilve1989
Copy link

I am also still seeing this on [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external dependency Blocked by external dependency, we can’t do anything about it typescript
Projects
None yet
Development

No branches or pull requests

5 participants