title: Typescript module has no exported members - react
body: <p>I am working on a react, redux Typescript application.  I have a strange situation where after some changes one of the modules has stopped exporting its members.</p>
  
  <p>The folder structure is:</p>
  
  <pre><code>src
  |---- components
  |---- containers
  </code></pre>
  
  <p>The 'components' folder has the .tsx files while the wrapping .ts files are in the 'containers' folder.</p>
  
  <p>The module NodeList.tsx is listed below:</p>
  
  <pre><code>import * as React from "react";
  
  export const NodeList = (props) =&gt; (
      &lt;div id="NodeList"&gt;
          &lt;ul&gt;
          {props.items.map((item, i) =&gt; (
              &lt;li key={i} &gt;
                  &lt;span id={"Item_"+i}&gt;{item}&lt;/span&gt;
              &lt;/li&gt;
              )
          )}
          &lt;/ul&gt;
      &lt;/div&gt;
      )
  </code></pre>
  
  <p>The wrapping container NodeListContainer is:</p>
  
  <pre><code>import { connect } from "react-redux";
  import { Provider } from "react-redux";
  
  import { Nodelist } from "../components/NodeList"
  
  const nodesAsArrayOfType = (state, nodeType: string) =&gt; {
      console.log("Going for nodes of type ", nodeType)
      let a = state.data.model.nodes
      let k = Object.keys(a);
      let sub = k.filter((e) =&gt; {
                     return a[e].nodeType == nodeType
          }).map((e) =&gt; a[e])
      console.log("Got nodes ", sub)    
      return sub
  }
  
  const mapStateToProps = (state) =&gt; {
      var list = nodesAsArrayOfType(state, state.UIstate.focusNodeType).map((e) =&gt; {return JSON.stringify(e)})
      console.log("Returning ", list, list.length)
      return {
          items: list
      }
  }
  
  const mapDispatchToProps = (dispatch) =&gt; {
      return {
          newTextValue: (e) =&gt; {dispatch({type: "ON_CHANGE", text: e.target.value})}
      }
  }
  
  export const NodeListContainer = connect(
      mapStateToProps,
      mapDispatchToProps
      )(NodeList)
  </code></pre>
  
  <p>The import of NodeList above is being flagged with the error message </p>
  
  <pre><code>ERROR in ./src/containers/NodeListContainer.ts
  (4,10): error TS2305: Module '"MyProject/src/components/NodeList"' has no exported member 'Nodelist'.
  </code></pre>
  
  <p>Can anyone provide any insight into what might have happened here?</p>