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

Created on 4 Jun 2018  路  9Comments  路  Source: mui-org/material-ui

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.

external dependency typescript

Most helpful comment

I am also still seeing this on [email protected]

All 9 comments

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

@gsbelarus Do you use allowSyntheticDefaultImports compiler option?

Looks like the issue happens when this option is enabled.

yes, I have allowSyntheticDefaultImports = true

The fix will be in the next TS release (v2.9.2): https://github.com/Microsoft/TypeScript/issues/24528#issuecomment-393982613

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

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

works well with TS3.0.0.

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

I am also still seeing this on [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rbozan picture rbozan  路  3Comments

finaiized picture finaiized  路  3Comments

pola88 picture pola88  路  3Comments

ryanflorence picture ryanflorence  路  3Comments

chris-hinds picture chris-hinds  路  3Comments