error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist

Richard picture Richard · Jun 7, 2016 · Viewed 18.5k times · Source

Even though I've installed & referenced the Typings library 'react' like this

/// <reference path="../../../typings/browser.d.ts" />

I'm still getting the error below: enter image description here

Is there another Typings library I should be installing as well?

Answer

darthtrevino picture darthtrevino · Jun 23, 2016

There are two versions of React available in Typings. I've seen this issue with typings install react and using noImplicitAny.

I resolved this by installing the global version: typings install dt~react --globaltypings search react results