title: The requested module does not provide an export named
body: <p>I'm translating this javascript project (<a href="https://github.com/Legorin/satisfactory-calculator" rel="nofollow noreferrer">https://github.com/Legorin/satisfactory-calculator</a>) to typescript.</p>
  <p>I'm getting an error when I import the transpiled typescript file in a html script tag.</p>
  <pre><code>&lt;script&gt;
    var handlers = {}
  &lt;/script&gt;
  &lt;script type=&quot;module&quot;&gt;
    import { Initilatizion } from &quot;./init.js&quot;;
    handlers.init = Initilatizion.init;
  &lt;/script&gt;
  </code></pre>
  <p>The error is: <code>Uncaught SyntaxError: The requested module './init.js' does not provide an export named 'Initilatizion'</code></p>
  <p>Here is my init.ts file</p>
  <pre><code>import { Belt } from &quot;./belt&quot;;
  import { Building } from &quot;./building&quot;;
  import { FactorySpecification } from &quot;./factorySpecification&quot;;
  import { Fragment } from &quot;./fragment&quot;;
  import { Item } from &quot;./item&quot;;
  import { Recipe } from &quot;./recipe&quot;;
  import { Settings } from &quot;./settings&quot;;
  // tslint:disable-next-line: no-var-requires
  const d3 = require(&quot;../third_party/d3.min.js&quot;);
  
  export class Initilatizion {
      public static loadData(settings) {
          const spec: FactorySpecification = FactorySpecification.getInstance();
          d3.json(&quot;data/data.json&quot;).then((data) =&gt; {
              const items = Item.getItems(data);
              const recipes = Recipe.getRecipes(data, items);
              const buildings = Building.getBuildings(data);
              const belts = Belt.getBelts(data);
              spec.setData(items, recipes, buildings, belts);
  
              Settings.renderSettings(settings);
  
              spec.updateSolution();
          });
      }
  
      public static init() {
          const settings = Fragment.loadSettings(window.location.hash);
          this.loadData(settings);
      }
  }
  </code></pre>
  <p>Here is my tsconfig.json</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;module&quot;: &quot;commonjs&quot;,
      &quot;esModuleInterop&quot;: true,
      &quot;target&quot;: &quot;es6&quot;,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;sourceMap&quot;: true,
      &quot;allowJs&quot;: true,
      &quot;outDir&quot;: &quot;dist&quot;,
      &quot;sourceRoot&quot;: &quot;src&quot;,
    },
  }
  </code></pre>
  <p>Where is my mistake?</p>