title: Error TS2694: Namespace '"react"' has no exported member 'ReactNode', 'DetailedHTMLProps', 'HTMLAttributes', 'SyntheticEvent', 'HTMLProps'
body: <p>In my react-typescript-electron project I have:</p>
  <pre><code>&quot;devDependencies&quot;: {
    &quot;@types/react&quot;: &quot;^17.0.0&quot;,
    &quot;@types/react-dom&quot;: &quot;^17.0.0&quot;
   },
  &quot;dependencies&quot;: {
    &quot;react&quot;: &quot;^17.0.1&quot;,
     &quot;react-dom&quot;: &quot;^17.0.1&quot;
   }
  </code></pre>
  <p>This is my tsconfig.json file:</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;module&quot;: &quot;CommonJS&quot;,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;lib&quot;: [
        &quot;dom&quot;,
        &quot;es2015&quot;,
        &quot;es2016&quot;,
        &quot;es2017&quot;,
        &quot;dom&quot;,
        &quot;dom.iterable&quot;,
      ],
      &quot;noImplicitAny&quot;: false,
      &quot;sourceMap&quot;: true,
      &quot;rootDir&quot;: &quot;src&quot;,
      &quot;outDir&quot;: &quot;dist&quot;,
      &quot;baseUrl&quot;: &quot;.&quot;,
      &quot;esModuleInterop&quot;: true,
      &quot;forceConsistentCasingInFileNames&quot;: true,
      &quot;jsx&quot;: &quot;react&quot;,
      &quot;lib&quot;: [&quot;dom&quot;, &quot;esnext&quot;],
      &quot;noEmitOnError&quot;: true,
      &quot;noImplicitReturns&quot;: true,
      &quot;noUnusedLocals&quot;: false,
      &quot;noUnusedParameters&quot;: false,
      &quot;removeComments&quot;: true,
      &quot;strict&quot;: true,
      &quot;downlevelIteration&quot;: true,
      &quot;declaration&quot;: true,
      &quot;alwaysStrict&quot;: true,
      &quot;skipLibCheck&quot;: true
    },
    &quot;include&quot;: [
      &quot;src/**/*&quot;
    ]
   }
  </code></pre>
  <p>I'm getting these error messages:</p>
  <p>For this code:</p>
  <pre><code>import React from 'react';
  type Props = React.HTMLProps&lt;HTMLDivElement, HTMLDivElement&gt;
  </code></pre>
  <p>I'm getting this error:</p>
  <pre><code>error TS2694: Namespace '&quot;react&quot;' has no exported member 'HTMLProps'.
  type Props = React.HTMLProps&lt;HTMLDivElement, HTMLDivElement&gt;
  </code></pre>
  <p>For this code:</p>
  <pre><code>import React, { useState } from 'react';
  interface Props {
  summary: React.ReactNode;
    children: () =&gt; React.ReactNode;
  }
  </code></pre>
  <p>I'm getting these errors:</p>
  <pre><code> error TS2694: Namespace '&quot;react&quot;' has no exported member 'ReactNode'
   summary: React.ReactNode;
  
   error TS2694: Namespace '&quot;react&quot;' has no exported member 'ReactNode'
   children: () =&gt; React.ReactNode;
  </code></pre>
  <p>For this code:</p>
  <pre><code> import React from 'react'
   type Value = React.ReactElement
  </code></pre>
  <p>I'm getting this error:</p>
  <pre><code> error TS2694: Namespace '&quot;react&quot;' has no exported member 
  'ReactElement'
  </code></pre>
  <p>For this code:</p>
  <pre><code>import React, { useState } from 'react';
  const onToggle = (e: React.SyntheticEvent) =&gt; {
  </code></pre>
  <p>I'm getting this error:</p>
  <pre><code>error TS2694: Namespace '&quot;react&quot;' has no exported member 
  'SyntheticEvent'
  </code></pre>
  <p>For this code:</p>
  <pre><code>import React from 'react';
  type Props =  
  React.DetailedHTMLProps&lt;React.HTMLAttributes&lt;HTMLDivElement&gt;, 
  HTMLDivElement&gt;
  </code></pre>
  <p>I get these errors:</p>
  <pre><code>error TS2694: Namespace '&quot;react&quot;' has no exported member  
  'DetailedHTMLProps'
  </code></pre>
  <p>For this code:</p>
  <pre><code>import React, { Fragment } from 'react';
  export default function LogLink({ v, children }: Props) {
    function onClick(e: React.SyntheticEvent) {
  </code></pre>
  <p>I get this error:</p>
  <pre><code>error TS2694: Namespace '&quot;react&quot;' has no exported member 
  'SyntheticEvent'
  </code></pre>
  <p>Looking forward to your kind help.</p>