1

Suddenly my typescript is throwing an error whenever I try use header tags in my tsx files stating that

Property 'h1' does not exist on type 'JSX.IntrinsicElements'.  TS2339

It accepts all other tags div, span, section - basically anything else except for any of the the h1 through h6 tags

Here is the rest of the render component

      return (
        <Grid item xs={12}>
          <Paper className={styles.paper} variant='outlined'>
            <h1>Hello World</h1>
          </Paper>
        </Grid>
       )

Any thoughts would be appreciated

1
  • 1
    rm -rf node_modules && npm i Commented Apr 11, 2021 at 21:23

1 Answer 1

2

Eliya's suggestion resolved the issue

rm -rf node_modules && npm i 

Not the answer you're looking for? Browse other questions tagged or ask your own question.